public class EnumValueEncoder<E extends java.lang.Enum<E>> extends java.lang.Object implements ValueEncoder<E>
| Constructor and Description |
|---|
EnumValueEncoder(TypeCoercer typeCoercer,
java.lang.Class<E> enumType) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toClient(E value)
Converts a value into a client-side representation.
|
E |
toValue(java.lang.String clientValue)
Converts a client-side representation, provided by
ValueEncoder.toClient(Object), back into a server-side value. |
public EnumValueEncoder(TypeCoercer typeCoercer, java.lang.Class<E> enumType)
public java.lang.String toClient(E value)
ValueEncoderValueEncoder.toValue(String). In
some cases, what is returned is an identifier used to locate the true object, rather than a string representation
of the value itself.toClient in interface ValueEncoder<E extends java.lang.Enum<E>>value - to be encodedpublic E toValue(java.lang.String clientValue)
ValueEncoderValueEncoder.toClient(Object), back into a server-side value.toValue in interface ValueEncoder<E extends java.lang.Enum<E>>clientValue - string representation of the value's identity${project.version} - Copyright © 2003-2015 The Apache Software Foundation.