@InterfaceAudience.Public public class OrderedInt16 extends OrderedBytesBase<Short>
short of 16-bits using a fixed-length encoding. Built on
OrderedBytes.encodeInt16(PositionedByteRange, short, Order).| Modifier and Type | Field and Description |
|---|---|
static OrderedInt16 |
ASCENDING
Deprecated.
since 3.0.0 and will be removed in 4.0.0
|
static OrderedInt16 |
DESCENDING
Deprecated.
since 3.0.0 and will be removed in 4.0.0
|
order| Constructor and Description |
|---|
OrderedInt16(Order order)
Creates a new 16-bit
short with a fixed-length encoding. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getOrder, isOrderPreserving, isSkippable, skip@Deprecated public static final OrderedInt16 ASCENDING
@Deprecated public static final OrderedInt16 DESCENDING
public boolean isNullable()
DataTypeDataTypes 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)
DataTypebyte[] will be.val - The value to check.val.apublic Class<Short> encodedClass()
DataTypeDataType operates. Useful when working with bare
DataType instances.public Short decode(PositionedByteRange src)
DataTypeT from the buffer src.src - the buffer containing the encoded value.public int encode(PositionedByteRange dst, Short val)
DataTypeval 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.src - the PositionedByteRange to read the float fromshort read from bufferpublic int encodeShort(PositionedByteRange dst, short val)
val into buffer dst.dst - the PositionedByteRange to write toval - the value to write to dstCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.