Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * See the file LICENSE for redistribution information.
  * Copyright (c) 2000, 2010 Oracle and/or its affiliates.  All rights reserved.
 package com.sleepycat.bind.tuple;
A concrete TupleBinding for a sorted Double primitive wrapper or a sorted double primitive.

There are two ways to use this class:

  1. When using the package directly, the static methods in this class can be used to convert between primitive values and objects.
  2. When using the com.sleepycat.collections package, an instance of this class can be used with any stored collection.

See also:
Floating Point Formats
public class SortedDoubleBinding extends TupleBinding<Double> {
    /* javadoc is inherited */
    public Double entryToObject(TupleInput input) {
        return input.readSortedDouble();
    /* javadoc is inherited */
    public void objectToEntry(Double objectTupleOutput output) {
    /* javadoc is inherited */
    protected TupleOutput getTupleOutput(Double object) {
        return DoubleBinding.sizedOutput();

Converts an entry buffer into a simple double value.

entry is the source entry buffer.
the resulting value.
    public static double entryToDouble(DatabaseEntry entry) {
        return entryToInput(entry).readSortedDouble();

Converts a simple double value into an entry buffer.

val is the source value.
entry is the destination entry buffer.
    public static void doubleToEntry(double valDatabaseEntry entry) {
New to GrepCode? Check out our FAQ X