org.apache.accumulo.core.client.lexicoder
Class ListLexicoder<LT>

java.lang.Object
  extended by org.apache.accumulo.core.client.lexicoder.ListLexicoder<LT>
All Implemented Interfaces:
Encoder<List<LT>>, Lexicoder<List<LT>>, TypedValueCombiner.Encoder<List<LT>>

public class ListLexicoder<LT>
extends Object
implements Lexicoder<List<LT>>

A lexicoder to encode/decode a Java List to/from a byte array where the concatenation of each encoded element sorts lexicographically.

Since:
1.6.0

Constructor Summary
ListLexicoder(Lexicoder<LT> lexicoder)
           
 
Method Summary
 List<LT> decode(byte[] b)
           
 byte[] encode(List<LT> v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListLexicoder

public ListLexicoder(Lexicoder<LT> lexicoder)
Method Detail

encode

public byte[] encode(List<LT> v)
Specified by:
encode in interface TypedValueCombiner.Encoder<List<LT>>
Returns:
a byte array containing the concatenation of each element in the list encoded.

decode

public List<LT> decode(byte[] b)
Specified by:
decode in interface TypedValueCombiner.Encoder<List<LT>>


Copyright © 2015 Apache Accumulo Project. All rights reserved.