AutoMedType
Keywords: uk.ac.ic.doc.automed.wrappers.AutoMedType 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 AutoMedType

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

Direct Known Subclasses:
  AutoMedBoolean, AutoMedFloat, AutoMedInteger, AutoMedString, AutoMedTime, AutoMedTuple

    public abstract class AutoMedType

extends java.lang.Object

Provides a base for the representation of basic types supported by AutoMed.

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

Field Summary
`static int` | `BOOLEAN` Type to represent a boolean true/false value.
`static int` | `FLOAT` Type to represent a floating point atomic type
`static int` | `INTEGER` Type to represent a twos-complement integer atomic type
`static java.lang.String` | `NULL_STR` String to use to represent null values
`static int` | `STRING` Type to represent an arbitrary length string in the unicode character set.
`static int` | `TIME` Type to represent a time (on a particular day)
`static int` | `TUPLE` Type to represent a tuple of atomic types

Constructor Summary
`AutoMedType()`

Method Summary
`abstract double` | `doubleValue()` Return the double representation of this AutoMedType.
`abstract boolean` | `equals(AutoMedType v)` Test two AutoMedTypes for equality, performing conversions as appropriate.
`abstract int` | `getType()` Return the Type (INTEGER, TUPLE, ...) of this AutoMedType
`boolean` | `isNull()` Is this type a null value?
`abstract java.lang.String` | `toString()` Return a string representation of this AutoMedType.

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

Field Detail

### NULL_STR

    public static final java.lang.String NULL_STR

  String to use to represent null values

  See Also:
    Constant Field Values

### INTEGER

    public static final int INTEGER

  Type to represent a twos-complement integer atomic type

  See Also:
    Constant Field Values

### TUPLE

    public static final int TUPLE

  Type to represent a tuple of atomic types

  See Also:
    Constant Field Values

### FLOAT

    public static final int FLOAT

  Type to represent a floating point atomic type

  See Also:
    Constant Field Values

### TIME

    public static final int TIME

  Type to represent a time (on a particular day)

  See Also:
    Constant Field Values

### STRING

    public static final int STRING

  Type to represent an arbitrary length string in the unicode character set.

  See Also:
    Constant Field Values

### BOOLEAN

    public static final int BOOLEAN

  Type to represent a boolean true/false value.

  See Also:
    Constant Field Values

Constructor Detail

### AutoMedType

    public AutoMedType()

Method Detail

### toString

    public abstract java.lang.String toString()

  Return a string representation of this AutoMedType.

  Overrides:
    `toString` in class `java.lang.Object`

### doubleValue

    public abstract double doubleValue()

  Return the double representation of this AutoMedType. Booleans will be converted to 1.0 if true, 0 otherwise. Strings are parsed as doubles, and if that parsing fails then 0 is returned. Tuples return the arity of the tuple.

### getType

    public abstract int getType()

  Return the Type (INTEGER, TUPLE, ...) of this AutoMedType

### equals

    public abstract boolean equals(AutoMedType v)

  Test two AutoMedTypes for equality, performing conversions as appropriate. Note that, unlike SQL but like Java, two null types will return true when compared.

### isNull

    public boolean isNull()

  Is this type a null value?

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