com.informix.jdbc

## Class IfxFloat

- java.lang.Object
- - com.informix.jdbc.IfxObject
  - - com.informix.jdbc.IfxFloat

    public class IfxFloat
    extends IfxObject

Support for double datatypes. This class derived from IfxObject class.

See Also:
  `IfxObject`

### Field Summary

### Fields inherited from class com.informix.jdbc.IfxObject

`conn, encodedLength, extendedID, extendedName, extendedOwner, ifxType, isNull, jdbcType, sourceType, trace, typeMap, used_in_update`

### Method Summary

Methods
`boolean` `equals(java.lang.Object other)` Find out whether two objects are equal.
`void` `fromBoolean(boolean b)` Convert a boolean to a double.
`void` `fromBoolean(java.lang.Boolean b)`
`void` `fromByte(byte b)` Convert a byte to a double.
`void` `fromByte(java.lang.Byte B)`
`void` `fromDecimal(java.math.BigDecimal bigdec)` Convert a BigDecimal to a double.
`void` `fromDouble(double d)` Convert a double to a double.
`void` `fromDouble(java.lang.Double D)`
`void` `fromFloat(float f)` Convert a float to a double.
`void` `fromFloat(java.lang.Float F)`
`void` `fromIfx(byte[] b)` Set value to the given Informix network format
`void` `fromIfx(byte[] b, int offset, int length)` Set value to the given Informix network format
`void` `fromInt(int i)` Convert a integer to a double.
`void` `fromInt(java.lang.Integer I)`
`void` `fromLong(long l)` Convert a long to a double.
`void` `fromLong(java.lang.Long L)`
`void` `fromShort(short s)` Convert a short to a double.
`void` `fromShort(java.lang.Short S)`
`void` `fromString(java.lang.String str)` Convert a string to a double.
`boolean` `toBoolean()` Return the boolean value of this object.
`byte` `toByte()` Return the byte value of this object.
`java.math.BigDecimal` `toDecimal()` Return the BigDecimal value of this object.
`double` `toDouble()` convert float to double
`float` `toFloat()` Return the float value of this object.
`byte[]` `toIfx()` Convert value to Informix network type
`byte[]` `toIfxTuple()` Convert value to Informix tuple format
`int` `toInt()` Return the integer value of this object.
`long` `toLong()` Return the long value of this object.
`java.lang.Object` `toObject()` Returns the equivalent Java object
`short` `toShort()` Return the short value of this object.
`java.lang.String` `toString()` Return the string value of this object.

### Methods inherited from class com.informix.jdbc.IfxObject

`clear, clearWarning, fromAsciiStream, fromAsciiStream, fromBinaryStream, fromBinaryStream, fromBlob, fromBytes, fromCharacterStream, fromCharacterStream, fromClob, fromDate, fromDecimal, fromIfx, fromIfx, fromIfx, fromIfx, fromInputStream, fromInputStream, fromIntervalDF, fromIntervalYM, fromObject, fromObject, fromObject, fromString, fromTime, fromTimestamp, get_used_in_update, getEncodedLength, getWarning, isNull, nullify, set_used_in_update, setConnection, setExtendedTypeName, setIfxType, setTypeMap, toAsciiStream, toBinaryStream, toBlob, toBytes, toCharacterStream, toClob, toDate, toIfxBSONObject, toInputStream, toInterval, toIntervalDF, toIntervalYM, toObject, toTime, toTimestamp, toUnloadString, unnullify`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### toIfx

    public byte[] toIfx()

Convert value to Informix network type

Overrides:
  `toIfx` in class `IfxObject`
Returns:
  a byte array

#### toIfxTuple

    public byte[] toIfxTuple()

Convert value to Informix tuple format

Overrides:
  `toIfxTuple` in class `IfxObject`
Returns:
  a byte array

#### fromIfx

    public void fromIfx(byte[] b)

Set value to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`
Parameters:
  `b` - a byte array in network format.

#### fromIfx

    public void fromIfx(byte[] b,
               int offset,
               int length)

Set value to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`
Parameters:
  `b` - a byte array in network format.
  `offset` - offset into byte array
  `length` - data length

#### equals

    public boolean equals(java.lang.Object other)

Description copied from class: `IfxObject`
Find out whether two objects are equal.

Overrides:
  `equals` in class `IfxObject`
Parameters:
  `other` - the other object to compare with
Returns:
  true if the objects are equal

#### toObject

    public java.lang.Object toObject()

Returns the equivalent Java object

Overrides:
  `toObject` in class `IfxObject`

#### toByte

    public byte toByte()
                throws java.sql.SQLException

Return the byte value of this object.

Overrides:
  `toByte` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromByte

    public void fromByte(byte b)
                  throws java.sql.SQLException

Convert a byte to a double.

Overrides:
  `fromByte` in class `IfxObject`
Parameters:
  `b` - byte value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromByte

    public void fromByte(java.lang.Byte B)
                  throws java.sql.SQLException

Overrides:
  `fromByte` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toDouble

    public double toDouble()

convert float to double

Overrides:
  `toDouble` in class `IfxObject`

#### fromDouble

    public void fromDouble(double d)
                    throws java.sql.SQLException

Convert a double to a double.

Overrides:
  `fromDouble` in class `IfxObject`
Parameters:
  `b` - double value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromDouble

    public void fromDouble(java.lang.Double D)
                    throws java.sql.SQLException

Overrides:
  `fromDouble` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toShort

    public short toShort()
                  throws java.sql.SQLException

Return the short value of this object.

Overrides:
  `toShort` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromShort

    public void fromShort(short s)
                   throws java.sql.SQLException

Convert a short to a double.

Overrides:
  `fromShort` in class `IfxObject`
Parameters:
  `s` - short value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromShort

    public void fromShort(java.lang.Short S)
                   throws java.sql.SQLException

Overrides:
  `fromShort` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toInt

    public int toInt()
              throws java.sql.SQLException

Return the integer value of this object.

Overrides:
  `toInt` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromInt

    public void fromInt(int i)
                 throws java.sql.SQLException

Convert a integer to a double.

Overrides:
  `fromInt` in class `IfxObject`
Parameters:
  `i` - integer value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromInt

    public void fromInt(java.lang.Integer I)
                 throws java.sql.SQLException

Overrides:
  `fromInt` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toLong

    public long toLong()
                throws java.sql.SQLException

Return the long value of this object.

Overrides:
  `toLong` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromLong

    public void fromLong(long l)
                  throws java.sql.SQLException

Convert a long to a double.

Overrides:
  `fromLong` in class `IfxObject`
Parameters:
  `l` - long value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromLong

    public void fromLong(java.lang.Long L)
                  throws java.sql.SQLException

Overrides:
  `fromLong` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toFloat

    public float toFloat()
                  throws java.sql.SQLException

Return the float value of this object.

Overrides:
  `toFloat` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromFloat

    public void fromFloat(float f)
                   throws java.sql.SQLException

Convert a float to a double.

Overrides:
  `fromFloat` in class `IfxObject`
Parameters:
  `f` - float value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromFloat

    public void fromFloat(java.lang.Float F)
                   throws java.sql.SQLException

Overrides:
  `fromFloat` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toDecimal

    public java.math.BigDecimal toDecimal()
                                   throws java.sql.SQLException

Return the BigDecimal value of this object.

Overrides:
  `toDecimal` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromDecimal

    public void fromDecimal(java.math.BigDecimal bigdec)
                     throws java.sql.SQLException

Convert a BigDecimal to a double.

Overrides:
  `fromDecimal` in class `IfxObject`
Parameters:
  `bigdec` - BigDecimal value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### toBoolean

    public boolean toBoolean()
                      throws java.sql.SQLException

Return the boolean value of this object. If value == 0 then return false otherwise return true.

Overrides:
  `toBoolean` in class `IfxObject`
Returns:
  returns converted value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromBoolean

    public void fromBoolean(boolean b)
                     throws java.sql.SQLException

Convert a boolean to a double. If true set value to 1 if false set value to 0.

Overrides:
  `fromBoolean` in class `IfxObject`
Parameters:
  `b` - boolean value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed

#### fromBoolean

    public void fromBoolean(java.lang.Boolean b)
                     throws java.sql.SQLException

Overrides:
  `fromBoolean` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toString

    public java.lang.String toString()

Return the string value of this object.

Overrides:
  `toString` in class `IfxObject`
Returns:
  returns converted value

#### fromString

    public void fromString(java.lang.String str)
                    throws java.sql.SQLException

Convert a string to a double.

Overrides:
  `fromString` in class `IfxObject`
Parameters:
  `str` - string value to convert
Throws:
  `java.sql.SQLException` - if the conversion failed