com.sleepycat.bind.tuple
public class SortedDoubleBinding extends TupleBinding
TupleBinding for a Double primitive
wrapper or a double 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 DoubleBinding which does not by default support sorting of negative values. Please note that:
There are two ways to use this class:
| Method Summary | |
|---|---|
| static void | doubleToEntry(double val, DatabaseEntry entry)
Converts a simple double value into an entry buffer.
|
| static double | entryToDouble(DatabaseEntry entry)
Converts an entry buffer into a simple double value.
|
| Object | entryToObject(TupleInput input) |
| protected TupleOutput | getTupleOutput(Object object) |
| void | objectToEntry(Object object, TupleOutput output) |
double value into an entry buffer.
Parameters: val is the source value. entry is the destination entry buffer.
double value.
Parameters: entry is the source entry buffer.
Returns: the resulting value.