|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.types.OrderedBytesBase<Short>
org.apache.hadoop.hbase.types.OrderedInt16
@InterfaceAudience.Public @InterfaceStability.Evolving public class OrderedInt16
A short
of 16-bits using a fixed-length encoding. Built on
OrderedBytes.encodeInt16(PositionedByteRange, short, Order)
.
Field Summary | |
---|---|
static OrderedInt16 |
ASCENDING
|
static OrderedInt16 |
DESCENDING
|
Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase |
---|
order |
Constructor Summary | |
---|---|
protected |
OrderedInt16(Order order)
|
Method Summary | |
---|---|
Short |
decode(PositionedByteRange src)
Read an instance of T from the buffer src . |
short |
decodeShort(PositionedByteRange src)
Read a short value from the buffer src . |
int |
encode(PositionedByteRange dst,
Short val)
Write instance val into buffer dst . |
Class<Short> |
encodedClass()
Inform consumers over what type this DataType operates. |
int |
encodedLength(Short val)
Inform consumers how long the encoded byte[] will be. |
int |
encodeShort(PositionedByteRange dst,
short val)
Write instance val into buffer dst . |
boolean |
isNullable()
Indicates whether this instance supports encoding null values. |
Methods inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase |
---|
getOrder, isOrderPreserving, isSkippable, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final OrderedInt16 ASCENDING
public static final OrderedInt16 DESCENDING
Constructor Detail |
---|
protected OrderedInt16(Order order)
Method Detail |
---|
public boolean isNullable()
DataType
DataType
s that support null should treat null as comparing
less than any non-null value for default sort ordering purposes.
isNullable
in interface DataType<Short>
isNullable
in class OrderedBytesBase<Short>
true
when null is supported, false
otherwise.public int encodedLength(Short val)
DataType
byte[]
will be.
val
- The value to check.
val
.apublic Class<Short> encodedClass()
DataType
DataType
operates. Useful
when working with bare DataType
instances.
public Short decode(PositionedByteRange src)
DataType
T
from the buffer src
.
src
- the buffer containing the encoded value.public int encode(PositionedByteRange dst, Short val)
DataType
val
into buffer dst
.
dst
- the buffer containing the encoded value.val
- the value to encode onto dst
.
public short decodeShort(PositionedByteRange src)
short
value from the buffer src
.
public int encodeShort(PositionedByteRange dst, short val)
val
into buffer dst
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |