|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.util.EnumValueEncoder<E>
public class EnumValueEncoder<E extends java.lang.Enum<E>>
A value encoder that can be used for arbitrary Enum types. The enum name is stored as the client side value.
| Constructor Summary | |
|---|---|
EnumValueEncoder(TypeCoercer typeCoercer,
java.lang.Class<E> enumType)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EnumValueEncoder(TypeCoercer typeCoercer,
java.lang.Class<E> enumType)
| Method Detail |
|---|
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 encoded
public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||