com.sleepycat.bind.tuple
public class SortedFloatBinding extends TupleBinding
TupleBinding
for a Float
primitive
wrapper or a float
primitive.
This class produces byte array values that by default (without a custom comparator) sort correctly, including sorting of negative values. Therefore, this class should normally be used instead of FloatBinding which does not by default support sorting of negative values. Please note that:
There are two ways to use this class:
Method Summary | |
---|---|
static float | entryToFloat(DatabaseEntry entry)
Converts an entry buffer into a simple float value.
|
Object | entryToObject(TupleInput input) |
static void | floatToEntry(float val, DatabaseEntry entry)
Converts a simple float value into an entry buffer.
|
protected TupleOutput | getTupleOutput(Object object) |
void | objectToEntry(Object object, TupleOutput output) |
float
value.
Parameters: entry is the source entry buffer.
Returns: the resulting value.
float
value into an entry buffer.
Parameters: val is the source value. entry is the destination entry buffer.