public class EnumStringifier<E extends Enum> extends Object implements Stringifier<E>, InitializeStringifier
Converts Enums back and forth with their string representation
Constructor and Description |
---|
EnumStringifier() |
Modifier and Type | Method and Description |
---|---|
E |
fromString(String str)
Convert the string back to a thing
|
void |
init(ObjectifyFactory fact,
Type keyType)
Informs the stringifier of the actual key type.
|
String |
toString(E obj)
Convert the thing to a string
|
public void init(ObjectifyFactory fact, Type keyType)
InitializeStringifier
init
in interface InitializeStringifier
fact
- is just handy to have aroundkeyType
- is the declared type of the map key.public String toString(E obj)
Stringifier
toString
in interface Stringifier<E extends Enum>
public E fromString(String str)
Stringifier
fromString
in interface Stringifier<E extends Enum>
Copyright © 2016. All rights reserved.