public static class

ObjectConverter.MappedEnumConverter

extends ObjectConverter<T>
java.lang.Object
   ↳ com.google.gdata.wireformats.ObjectConverter<T>
     ↳ com.google.gdata.wireformats.ObjectConverter.MappedEnumConverter<T>

Class Overview

Object converter for pseudo-enum types backed by a map.

Summary

Fields
private final Map<String, T> map
[Expand]
Inherited Fields
From class com.google.gdata.wireformats.ObjectConverter
Public Constructors
ObjectConverter.MappedEnumConverter(Map<String, T> map)
Creates a converter and links it with a map.
Public Methods
T convertValue(String value, Class<? extends T> datatype)
Translate an untyped (string) value to a typed value.
[Expand]
Inherited Methods
From class com.google.gdata.wireformats.ObjectConverter
From class java.lang.Object

Fields

private final Map<String, T> map

Public Constructors

public ObjectConverter.MappedEnumConverter (Map<String, T> map)

Creates a converter and links it with a map.

Parameters
map A map that converts string values into values of the correct type. The caller must make sure the map can be accessed concurrently before adding the resulting converter using addConverter(Class, ObjectConverter).

Public Methods

public T convertValue (String value, Class<? extends T> datatype)

Translate an untyped (string) value to a typed value.

Parameters
value Value to convert.
datatype
Returns
  • value converted to type T.