| java.lang.Object com.sleepycat.bind.tuple.TupleBase com.sleepycat.bind.tuple.TupleBinding com.sleepycat.bind.tuple.SortedDoubleBinding
SortedDoubleBinding | public class SortedDoubleBinding extends TupleBinding (Code) | | A concrete 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:
- 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.
|
doubleToEntry | public static void doubleToEntry(double val, DatabaseEntry entry)(Code) | | Converts a simple double value into an entry buffer.
Parameters: val - is the source value. Parameters: entry - is the destination entry buffer. |
entryToDouble | public static double entryToDouble(DatabaseEntry entry)(Code) | | Converts an entry buffer into a simple double value.
Parameters: entry - is the source entry buffer. the resulting value. |
|
|