AutoMedFloat
Keywords: uk.ac.ic.doc.automed.wrappers.AutoMedFloat class

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

## uk.ac.ic.doc.automed.wrappers
Class AutoMedFloat

    java.lang.Object
      uk.ac.ic.doc.automed.wrappers.AutoMedType
          uk.ac.ic.doc.automed.wrappers.AutoMedFloat

    public class AutoMedFloat

extends AutoMedType

Provides generic representation of floating values with abritrary precision.

Author:
  Peter McBrien (pjm@doc.ic.ac.uk)

Field Summary

Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedType
`BOOLEAN, FLOAT, INTEGER, NULL_STR, STRING, TIME, TUPLE`

Constructor Summary
`AutoMedFloat()` Create a new AutoMedFloat that is null in value
`AutoMedFloat(java.math.BigDecimal value)` Create a new AutoMedFloat from a BigDecimal.
`AutoMedFloat(double value, int bits)` Create a new AutoMedFloat from a 64 bit floating point value.
`AutoMedFloat(float value, int bits)` Create a new AutoMedFloat from a 32 bit floating point value.
`AutoMedFloat(java.lang.String text)` Create a new AutoMedFloat from text, creating a null value if the text cannon be parsed.

Method Summary
`AutoMedFloat` | `add(AutoMedFloat v)` Return the sum of two AutoMedFloats.
`AutoMedFloat` | `divide(AutoMedFloat v)` Return the division of two AutoMedFloats.
`double` | `doubleValue()` Return the value of this AutoMedFloat as an double
`boolean` | `equals(AutoMedType v)` Test two AutoMedTypes for equality, performing conversions as appropriate.
`float` | `floatValue()` Return the value of this AutoMedFloat as an float
`int` | `getType()` Return the Type (INTEGER, TUPLE, ...) of this AutoMedType
`AutoMedFloat` | `multiply(AutoMedFloat v)` Return the multiplication of two AutoMedFloats.
`AutoMedFloat` | `subtract(AutoMedFloat v)` Return the difference of two AutoMedFloats.
`java.lang.String` | `toString()` Return a string representation of this AutoMedFloat.

Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedType
`isNull`

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

Constructor Detail

### AutoMedFloat

    public AutoMedFloat(java.lang.String text)

  Create a new AutoMedFloat from text, creating a null value if the text cannon be parsed.

### AutoMedFloat

    public AutoMedFloat(float value,
                        int bits)

  Create a new AutoMedFloat from a 32 bit floating point value.

### AutoMedFloat

    public AutoMedFloat(double value,
                        int bits)

  Create a new AutoMedFloat from a 64 bit floating point value.

### AutoMedFloat

    public AutoMedFloat(java.math.BigDecimal value)

  Create a new AutoMedFloat from a BigDecimal.

### AutoMedFloat

    public AutoMedFloat()

  Create a new AutoMedFloat that is null in value

Method Detail

### floatValue

    public float floatValue()

  Return the value of this AutoMedFloat as an float

### doubleValue

    public double doubleValue()

  Return the value of this AutoMedFloat as an double

  Specified by:
    `doubleValue` in class `AutoMedType`

### add

    public AutoMedFloat add(AutoMedFloat v)

  Return the sum of two AutoMedFloats.

### subtract

    public AutoMedFloat subtract(AutoMedFloat v)

  Return the difference of two AutoMedFloats.

### divide

    public AutoMedFloat divide(AutoMedFloat v)

  Return the division of two AutoMedFloats.

### multiply

    public AutoMedFloat multiply(AutoMedFloat v)

  Return the multiplication of two AutoMedFloats.

### toString

    public java.lang.String toString()

  Return a string representation of this AutoMedFloat.

  Specified by:
    `toString` in class `AutoMedType`

### equals

    public boolean equals(AutoMedType v)

  Description copied from class: `AutoMedType`
  Test two AutoMedTypes for equality, performing conversions as appropriate. Note that, unlike SQL but like Java, two null types will return true when compared.

  Specified by:
    `equals` in class `AutoMedType`

### getType

    public final int getType()

  Description copied from class: `AutoMedType`
  Return the Type (INTEGER, TUPLE, ...) of this AutoMedType

  Specified by:
    `getType` in class `AutoMedType`

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