Class ListLexicoder<LT>

  • All Implemented Interfaces:
    Encoder<List<LT>>, Lexicoder<List<LT>>

    public class ListLexicoder<LT>
    extends org.apache.accumulo.core.clientImpl.lexicoder.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. See SequenceLexicoder for an encoding that supports empty lists.
    Since:
    1.6.0
    • Constructor Detail

      • ListLexicoder

        public ListLexicoder​(Lexicoder<LT> lexicoder)
    • 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: AbstractEncoder
        Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.
        Specified by:
        decodeUnchecked in class AbstractEncoder<List<LT>>