Package org.apache.hadoop.hbase.types
Class OrderedFloat64
A
double
of 64-bits using a fixed-length encoding. Built on
OrderedBytes.encodeFloat64(PositionedByteRange, double, Order)
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final OrderedFloat64
Deprecated.since 3.0.0 and will be removed in 4.0.0static final OrderedFloat64
Deprecated.since 3.0.0 and will be removed in 4.0.0Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order
-
Constructor Summary
ConstructorDescriptionOrderedFloat64
(Order order) Creates a new 64-bitedouble
with a fixed-length encoding. -
Method Summary
Modifier and TypeMethodDescriptionRead an instance ofT
from the buffersrc
.double
Read adouble
value from the buffersrc
.int
encode
(PositionedByteRange dst, Double val) Write instanceval
into bufferdst
.Inform consumers over what type thisDataType
operates.int
encodedLength
(Double val) Inform consumers how long the encodedbyte[]
will be.int
encodeDouble
(PositionedByteRange dst, double val) Write instanceval
into bufferdst
.boolean
Indicates whether this instance supports encoding null values.Methods inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
getOrder, isOrderPreserving, isSkippable, skip
-
Field Details
-
ASCENDING
Deprecated.since 3.0.0 and will be removed in 4.0.0 -
DESCENDING
Deprecated.since 3.0.0 and will be removed in 4.0.0
-
-
Constructor Details
-
OrderedFloat64
Creates a new 64-bitedouble
with a fixed-length encoding.- Parameters:
order
- theOrder
to use
-
-
Method Details
-
isNullable
Description copied from interface:DataType
Indicates whether this instance supports encoding null values. This depends on the implementation details of the encoding format. AllDataType
s that support null should treat null as comparing less than any non-null value for default sort ordering purposes.- Specified by:
isNullable
in interfaceDataType<Double>
- Overrides:
isNullable
in classOrderedBytesBase<Double>
- Returns:
true
when null is supported,false
otherwise.
-
encodedLength
Description copied from interface:DataType
Inform consumers how long the encodedbyte[]
will be.- Parameters:
val
- The value to check.- Returns:
- the number of bytes required to encode
val
.a
-
encodedClass
Description copied from interface:DataType
Inform consumers over what type thisDataType
operates. Useful when working with bareDataType
instances. -
decode
Description copied from interface:DataType
Read an instance ofT
from the buffersrc
.- Parameters:
src
- the buffer containing the encoded value.
-
encode
Description copied from interface:DataType
Write instanceval
into bufferdst
.- Parameters:
dst
- the buffer containing the encoded value.val
- the value to encode ontodst
.- Returns:
- number of bytes written.
-
decodeDouble
Read adouble
value from the buffersrc
.- Parameters:
src
- thePositionedByteRange
to read thedouble
from- Returns:
- the
double
floating-point value with the same bit pattern
-
encodeDouble
Write instanceval
into bufferdst
.- Parameters:
dst
- thePositionedByteRange
to write toval
- the value to write todst
- Returns:
- the number of bytes written
-