Class ListLexicoder<LT>
- java.lang.Object
-
- org.apache.accumulo.core.client.lexicoder.AbstractEncoder<T>
-
- org.apache.accumulo.core.client.lexicoder.AbstractLexicoder<List<LT>>
-
- org.apache.accumulo.core.client.lexicoder.ListLexicoder<LT>
-
public class ListLexicoder<LT> extends AbstractLexicoder<List<LT>>
A lexicoder to encode/decode a Java List to/from a byte array where the concatenation of each encoded element sorts lexicographically. Note: Empty lists are not supported. SeeSequenceLexicoderfor an encoding that supports empty lists.- Since:
- 1.6.0
-
-
Constructor Summary
Constructors Constructor Description ListLexicoder(Lexicoder<LT> lexicoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LT>decode(byte[] b)protected List<LT>decodeUnchecked(byte[] b, int offset, int len)Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.byte[]encode(List<LT> v)-
Methods inherited from class org.apache.accumulo.core.client.lexicoder.AbstractEncoder
decode
-
-
-
-
Method Detail
-
encode
public byte[] encode(List<LT> v)
- Returns:
- a byte array containing the concatenation of each element in the list encoded.
-
decodeUnchecked
protected List<LT> decodeUnchecked(byte[] b, int offset, int len)
Description copied from class:AbstractEncoderDecodes a byte array without checking if the offset and len exceed the bounds of the actual array.- Specified by:
decodeUncheckedin classAbstractEncoder<List<LT>>
-
-