public static class ObjectConverter.MappedEnumConverter<T> extends ObjectConverter<T>
ObjectConverter.MappedEnumConverter<T>| Constructor and Description |
|---|
ObjectConverter.MappedEnumConverter(java.util.Map<java.lang.String,T> map)
Creates a converter and links it with a map.
|
| Modifier and Type | Method and Description |
|---|---|
T |
convertValue(java.lang.String value,
java.lang.Class<? extends T> datatype)
Translate an untyped (string) value to a typed value.
|
addConverter, getValue, getValuepublic ObjectConverter.MappedEnumConverter(java.util.Map<java.lang.String,T> map)
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 ObjectConverter.addConverter(java.lang.Class<V>, com.google.gdata.wireformats.ObjectConverter<V>).public T convertValue(java.lang.String value, java.lang.Class<? extends T> datatype) throws ParseException
ObjectConverterconvertValue in class ObjectConverter<T>value - value to convert.T.ParseException - if value cannot be parsed according to type