|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.wireformats.ObjectConverter<T>
com.google.gdata.wireformats.ObjectConverter.MappedEnumConverter<T>
public static class ObjectConverter.MappedEnumConverter<T>
Object converter for pseudo-enum types backed by a map.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gdata.wireformats.ObjectConverter |
---|
ObjectConverter.MappedEnumConverter<T> |
Constructor Summary | |
---|---|
ObjectConverter.MappedEnumConverter(java.util.Map<java.lang.String,T> map)
Creates a converter and links it with a map. |
Method Summary | |
---|---|
T |
convertValue(java.lang.String value,
java.lang.Class<? extends T> datatype)
Translate an untyped (string) value to a typed value. |
Methods inherited from class com.google.gdata.wireformats.ObjectConverter |
---|
addConverter, getValue, getValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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, com.google.gdata.wireformats.ObjectConverter)
.Method Detail |
---|
public T convertValue(java.lang.String value, java.lang.Class<? extends T> datatype) throws ParseException
ObjectConverter
convertValue
in class ObjectConverter<T>
value
- value to convert.
T
.
ParseException
- if value cannot be parsed according to type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |