Class EnumStringifier<E extends Enum>
- java.lang.Object
-
- com.googlecode.objectify.stringifier.EnumStringifier<E>
-
- All Implemented Interfaces:
InitializeStringifier,Stringifier<E>
public class EnumStringifier<E extends Enum> extends Object implements Stringifier<E>, InitializeStringifier
Converts Enums back and forth with their string representation
- Author:
- Jeff Schnitzer
-
-
Constructor Summary
Constructors Constructor Description EnumStringifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EfromString(String str)Convert the string back to a thingvoidinit(ObjectifyFactory fact, Type keyType)Informs the stringifier of the actual key type.StringtoString(E obj)Convert the thing to a string
-
-
-
Method Detail
-
init
public void init(ObjectifyFactory fact, Type keyType)
Description copied from interface:InitializeStringifierInforms the stringifier of the actual key type.- Specified by:
initin interfaceInitializeStringifier- Parameters:
fact- is just handy to have aroundkeyType- is the declared type of the map key.
-
toString
public String toString(E obj)
Description copied from interface:StringifierConvert the thing to a string- Specified by:
toStringin interfaceStringifier<E extends Enum>
-
fromString
public E fromString(String str)
Description copied from interface:StringifierConvert the string back to a thing- Specified by:
fromStringin interfaceStringifier<E extends Enum>
-
-