K
- type of the column key or nameE
- type of the enumerationpublic static final class EnumColumn.EnumColumnDecoder<K extends Serializable & Comparable<K>,E extends Enum<E>> extends Object implements ColumnDecoder<K,E>
Constructor and Description |
---|
EnumColumn.EnumColumnDecoder(Class<E> enumClass)
Creates an enumeration decoder.
|
Modifier and Type | Method and Description |
---|---|
Column<K,E> |
decode(com.netflix.astyanax.model.Column<K> code)
The enum is encoded to String and decoded from String using the
constant name.
|
static <E extends Enum<E>> |
decode(String code,
Class<E> enumClass)
Decodes an enumeration.
|
static String |
encode(Enum<?> value)
Encodes an enumeration.
|
public Column<K,E> decode(com.netflix.astyanax.model.Column<K> code) throws IllegalArgumentException
decode
in interface Decoder<Column<K extends Serializable & Comparable<K>,E extends Enum<E>>,com.netflix.astyanax.model.Column<K extends Serializable & Comparable<K>>>
code
- com.netflix.astyanax.model.ColumnIllegalArgumentException
public static String encode(Enum<?> value)
value
- enumeration constantCopyright © 2015. All Rights Reserved.