| java.lang.Object com.sleepycat.bind.tuple.TupleBase com.sleepycat.bind.tuple.TupleBinding com.sleepycat.bind.tuple.FloatBinding
FloatBinding | public class FloatBinding extends TupleBinding (Code) | | A concrete TupleBinding for a Float primitive
wrapper or a float primitive.
Note: This class produces byte array values that by default
(without a custom comparator) do not sort correctly for negative
values. Only non-negative values are sorted correctly by default. To sort
all values correctly by default, use
SortedFloatBinding .
There are two ways to use this class:
- When using the
com.sleepycat.je package directly, the static
methods in this class can be used to convert between primitive values and
DatabaseEntry objects.
- When using the
com.sleepycat.collections package, an instance of
this class can be used with any stored collection. The easiest way to
obtain a binding instance is with the
TupleBinding.getPrimitiveBinding method.
|
entryToFloat | public static float entryToFloat(DatabaseEntry entry)(Code) | | Converts an entry buffer into a simple float value.
Parameters: entry - is the source entry buffer. the resulting value. |
floatToEntry | public static void floatToEntry(float val, DatabaseEntry entry)(Code) | | Converts a simple float value into an entry buffer.
Parameters: val - is the source value. Parameters: entry - is the destination entry buffer. |
sizedOutput | static TupleOutput sizedOutput()(Code) | | Returns a tuple output object of the exact size needed, to avoid
wasting space when a single primitive is output.
|
|
|