Class IntegerLexicoder
- java.lang.Object
-
- org.apache.accumulo.core.client.lexicoder.AbstractEncoder<T>
-
- org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder<Integer>
-
- org.apache.accumulo.core.client.lexicoder.IntegerLexicoder
-
- All Implemented Interfaces:
Encoder<Integer>
,Lexicoder<Integer>
,TypedValueCombiner.Encoder<Integer>
public class IntegerLexicoder extends AbstractLexicoder<Integer>
A lexicoder for signed integers. The encoding sorts Integer.MIN_VALUE first and Integer.MAX_VALUE last. The encoding sorts -2 before -1. It corresponds to the sort order of Integer.- Since:
- 1.6.0
-
-
Constructor Summary
Constructors Constructor Description IntegerLexicoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
decode(byte[] b)
protected Integer
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(Integer i)
-
Methods inherited from class org.apache.accumulo.core.client.lexicoder.AbstractEncoder
decode
-
-
-
-
Method Detail
-
encode
public byte[] encode(Integer i)
-
decode
public Integer decode(byte[] b)
- Specified by:
decode
in interfaceTypedValueCombiner.Encoder<Integer>
- Overrides:
decode
in classAbstractEncoder<Integer>
-
decodeUnchecked
protected Integer 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<Integer>
-
-