public class DbDouble extends DbNumber
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.
| Modifier and Type | Field and Description |
|---|---|
double |
value
Deprecated.
|
BIGINT_DESC, bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC| Constructor and Description |
|---|
DbDouble()
Constructs an uninitialized
DbDouble. |
DbDouble(DbColDesc desc)
Constructs an uninitialized
DbDouble. |
DbDouble(double val)
Constructs an uninitialized
DbDouble. |
| Modifier and Type | Method and Description |
|---|---|
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() |
compareTo, compareTo, compareTo, equals, getColDesc, getDataTimeZone, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValuepublic double value
get and set to access it instead of accessing it directly.public DbDouble()
DbDouble. This
DbDouble object is mutable until a nonzero value
and the description of the column are set.public DbDouble(double val)
DbDouble. This
DbDouble object is mutable until DbColDesc is set.val - the double value for constructing.public DbDouble(DbColDesc desc)
DbDouble. This
DbDouble object is mutable until the value is set.desc - The value to be represented by the
DbColDesc object.public double get()
DbDouble as a
double value.public void set(double v)
DbDouble object that
represents the specified double argument.v - The double value to be represented by the
DbDouble object.public void set(java.sql.ResultSet rs,
int col)
throws java.sql.SQLException
DbDouble object that
represents the double value indicated by the
ResultSet parameter and an index of the column.public void set(JRHierarchicalDataset hds, int col) throws java.sql.SQLException
DbDouble object that
represents the double value indicated by the
JRHierarchicalDataset parameter and an index of the column.public java.lang.String toString()
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".public java.lang.Object clone()
DbDouble object.public boolean equals(DbNumber v)
true if and only if the argument is not
null but a DbDouble object that
contains the same DbNumber value as this object.public byte byteValue()
DbDouble as a
byte.public short shortValue()
DbDouble as a
short.shortValue in class DbNumberpublic int intValue()
DbDouble as an
int.public long longValue()
DbDouble as a
long value.public float floatValue()
DbDouble as a
float.floatValue in class DbNumberpublic double doubleValue()
DbDouble as a
double.doubleValue in class DbNumberpublic void setValue(DbNumber v)
DbDouble object that
represents the double value indicated by the
DbNumber parameter. The DbNumber object will be checked to see if it is null.public void setValue(java.lang.String v)
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.public java.lang.String toStringValue()
toStringValue in class DbValue