Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.connect
Class DbDouble

    java.lang.Object
      jet.connect.DbValue
          jet.connect.DbNumber
              jet.connect.DbDouble

All Implemented Interfaces:
  jet.util.DbValueable, jet.util.QuickSortableNode

    public class DbDouble

extends DbNumber

The `DbDouble` class wraps a value of the primitive type `double` in an object. An object of the type `DbDouble` contains a single field whose type is `double`.

In addition, this class provides several methods for converting a `DbDouble` to a `String` or other number types, as well as other constants and methods used when dealing with a `DbDouble`.

Field Summary
`double` | `value` Deprecated.

Fields inherited from class jet.connect.DbValue
`bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC`

Fields inherited from interface jet.util.DbValueable
`EQUAL, GREATER, LESS`

Constructor Summary
`DbDouble()` Constructs an uninitialized `DbDouble`.
`DbDouble(DbColDesc desc)` Constructs an uninitialized `DbDouble`.
`DbDouble(double val)` Constructs an uninitialized `DbDouble`.

Method Summary
`byte` | `byteValue()` Returns the value of this `DbDouble` as a `byte`.
`java.lang.Object` | `clone()` Creates a clone of this `DbDouble` object.
`double` | `doubleValue()` Returns the value of this `DbDouble` as a `double`.
`boolean` | `equals(DbNumber v)` Compares this object to the specified object.
`float` | `floatValue()` Returns the value of this `DbDouble` as a `float`.
`double` | `get()` Returns the value of this `DbDouble` as a `double` value.
`int` | `intValue()` Returns the value of this `DbDouble` as an `int`.
`long` | `longValue()` Returns the value of this `DbDouble` as a `long` value.
`void` | `set(double v)` Sets a newly allocated `DbDouble` object that represents the specified `double` argument.
`void` | `set(JRHierarchicalDataset hds, int col)` Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `JRHierarchicalDataset` parameter and an index of the column.
`void` | `set(java.sql.ResultSet rs, int col)` Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `ResultSet` parameter and an index of the column.
`void` | `setValue(DbNumber v)` Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `DbNumber` parameter.
`void` | `setValue(java.lang.String v)` Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `String` parameter.
`short` | `shortValue()` Returns the value of this `DbDouble` as a `short`.
`java.lang.String` | `toString()` Returns a `String` object representing this `DbDouble`'s value.
`java.lang.String` | `toStringValue()`

Methods inherited from class jet.connect.DbNumber
`compare, compareTo, equals, set`

Methods inherited from class jet.connect.DbValue
`compareTo, compareTo, equals, getColDesc, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValue`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### value

    public double value

  Deprecated.
  The field contains the value of this object Note use `get` and `set` to access it instead of accessing it directly.

Constructor Detail

### DbDouble

    public DbDouble()

  Constructs an uninitialized `DbDouble`. This `DbDouble` object is mutable until a nonzero value and the description of the column are set.

### DbDouble

    public DbDouble(double val)

  Constructs an uninitialized `DbDouble`. This `DbDouble` object is mutable until DbColDesc is set.

  Parameters:
    `val` - the double value for constructing.

### DbDouble

    public DbDouble(DbColDesc desc)

  Constructs an uninitialized `DbDouble`. This `DbDouble` object is mutable until the value is set.

  Parameters:
    `desc` - The value to be represented by the `DbColDesc` object.

Method Detail

### get

    public double get()

  Returns the value of this `DbDouble` as a `double` value.

### set

    public void set(double v)

  Sets a newly allocated `DbDouble` object that represents the specified `double` argument.

  Parameters:
    `v` - The double value to be represented by the `DbDouble` object.

### set

    public void set(java.sql.ResultSet rs,
                    int col)
             throws java.sql.SQLException

  Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `ResultSet` parameter and an index of the column.

  Specified by:
    `set` in class `DbValue`
  Parameters:
    `rs` - The `ResultSet` to be fetched.
    `col` - The index of the column.
  Throws:
    `java.sql.SQLException` - if the `ResultSet` does not contain the index.

### set

    public void set(JRHierarchicalDataset hds,
                    int col)
             throws java.sql.SQLException

  Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `JRHierarchicalDataset` parameter and an index of the column.

  Overrides:
    `set` in class `DbValue`
  Parameters:
    `hds` - The `JRHierarchicalDataset` to be fetched.
    `col` - The index of the column.
  Throws:
    `java.sql.SQLException` - if the `ResultSet` does not contain the index.

### toString

    public java.lang.String toString()

  Returns a `String` object representing this `DbDouble`'s value. The value is converted to signed decimal representation and returned as a string. if the value is null, it returns "NULL".

  Specified by:
    `toString` in class `DbValue`
  Returns:
    a string representation of the value of this object in base 10.

### clone

    public java.lang.Object clone()

  Creates a clone of this `DbDouble` object.

  Specified by:
    `clone` in interface `jet.util.DbValueable`
  Specified by:
    `clone` in class `DbValue`

### equals

    public boolean equals(DbNumber v)

  Compares this object to the specified object. The result is `true` if and only if the argument is not `null` but a `DbDouble` object that contains the same `DbNumber` value as this object.

  Specified by:
    `equals` in class `DbNumber`
  Parameters:
    `obj` - The DbNumber object to be compared with.
  Returns:
    `true` if the objects are the same; `false` otherwise.

### byteValue

    public byte byteValue()

  Returns the value of this `DbDouble` as a `byte`.

  Specified by:
    `byteValue` in class `DbNumber`

### shortValue

    public short shortValue()

  Returns the value of this `DbDouble` as a `short`.

  Specified by:
    `shortValue` in class `DbNumber`

### intValue

    public int intValue()

  Returns the value of this `DbDouble` as an `int`.

  Specified by:
    `intValue` in class `DbNumber`

### longValue

    public long longValue()

  Returns the value of this `DbDouble` as a `long` value.

  Specified by:
    `longValue` in class `DbNumber`

### floatValue

    public float floatValue()

  Returns the value of this `DbDouble` as a `float`.

  Specified by:
    `floatValue` in class `DbNumber`

### doubleValue

    public double doubleValue()

  Returns the value of this `DbDouble` as a `double`.

  Specified by:
    `doubleValue` in class `DbNumber`

### setValue

    public void setValue(DbNumber v)

  Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `DbNumber` parameter. The DbNumber object will be checked to see if it is null.

  Specified by:
    `setValue` in class `DbNumber`
  Parameters:
    `v` - The `DbNumber` to be converted to a `DbDouble`. If it is null, the value will not be set.

### setValue

    public void setValue(java.lang.String v)

  Sets a newly allocated `DbDouble` object that represents the `double` value indicated by the `String` parameter. The string is converted to a `double` value in exactly the manner used by the `valueOf` method for radix 10.

  Specified by:
    `setValue` in class `DbValue`
  Parameters:
    `v` - The `String` to be converted to a `DbDouble`. The argument is interpreted as representing a signed decimal `double`, which is exactly as if the argument were given to the `valueOf` method.

### toStringValue

    public java.lang.String toStringValue()

  Specified by:
    `toStringValue` in class `DbValue`
  Returns:
    a string which will represent the value in the DbValue(null flag and value). When compare StringValue from DbValues, we always assume that: the two DbValues have same DbColDesc. Two StringValue equals means the original DbValue equals. Does NOT transfer the compareTo(DbValue v) method. Only comparable dbValue implements this methods. String coding uses Base64.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD