Class ReverseLexicoder<T>
- java.lang.Object
-
- org.apache.accumulo.core.client.lexicoder.AbstractEncoder<T>
-
- org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder<T>
-
- org.apache.accumulo.core.client.lexicoder.ReverseLexicoder<T>
-
- All Implemented Interfaces:
Encoder<T>
,Lexicoder<T>
,TypedValueCombiner.Encoder<T>
public class ReverseLexicoder<T> extends AbstractLexicoder<T>
A lexicoder that flips the sort order from another lexicoder. If this is applied toDateLexicoder
, the most recent date will be sorted first and the oldest date will be sorted last. If it's applied toLongLexicoder
, the Long.MAX_VALUE will be sorted first and Long.MIN_VALUE will be sorted last, etc...- Since:
- 1.6.0
-
-
Constructor Summary
Constructors Constructor Description ReverseLexicoder(Lexicoder<T> lexicoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
decodeUnchecked(byte[] data, int offset, int len)
Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.byte[]
encode(T data)
-
Methods inherited from class org.apache.accumulo.core.client.lexicoder.AbstractEncoder
decode, decode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder
decode
-
-
-
-
Method Detail
-
encode
public byte[] encode(T data)
-
decodeUnchecked
protected T decodeUnchecked(byte[] data, 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 classAbstractEncoder<T>
-
-