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

    java.lang.Object
      |
      +--uk.ac.ic.doc.automed.wrappers.AutoMedType
            |
            +--uk.ac.ic.doc.automed.wrappers.AutoMedTuple

public class AutoMedTuple
extends AutoMedType

A structure to hold one tuple of data, to be used by AutoMedResult as the basis for storing sets, lists or bags of tuples.

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
`AutoMedTuple(AutoMedResult amr, int i, int nc)` Create a new tuple belonging to row i and with nc attributes

Method Summary
`double` | `doubleValue()` Return the arity (size) of the tuple as a double.
`boolean` | `equals(AutoMedType v)` Test two AutoMedTypes for equality, performing conversions as appropriate.
`AutoMedType` | `getAttribute(int no)` Return a particular attribute from a tuple (counting from one)
`int` | `getAttributeType(int attributeNumber)`
`AutoMedType[]` | `getData()` Return all the attributes of this tuple as an array
`int` | `getInt(int i)` Return a particular attribute from a tuple (counting from one) as a 32 bit integer
`java.lang.String` | `getString(int i)` Return a particular attribute from a tuple (counting from one) as a String
`int` | `getType()` Return the Type (INTEGER, TUPLE, ...) of this AutoMedType
`void` | `setAttribute(int no, AutoMedType v)` Set the value of a certain field
`int` | `size()`
`java.lang.String` | `toString()` Produce a string representation of the AutoMedTuple
`void` | `toString(java.lang.StringBuffer r)` Produce a string representation of the result set, where {} indicates a set of values, and [] a list of values

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

### AutoMedTuple

    public AutoMedTuple(AutoMedResult amr,
                        int i,
                        int nc)

  Create a new tuple belonging to row i and with nc attributes

Method Detail

### setAttribute

    public void setAttribute(int no,
                             AutoMedType v)
                      throws DataSourceException

  Set the value of a certain field

    `DataSourceException`

### size

    public int size()

### getData

    public AutoMedType[] getData()

  Return all the attributes of this tuple as an array

### getAttribute

    public AutoMedType getAttribute(int no)
                             throws DataSourceException

  Return a particular attribute from a tuple (counting from one)

    `DataSourceException`

### getString

    public java.lang.String getString(int i)

  Return a particular attribute from a tuple (counting from one) as a String

### doubleValue

    public double doubleValue()

  Return the arity (size) of the tuple as a double.

  Specified by:
    `doubleValue` in class `AutoMedType`

### getInt

    public int getInt(int i)
               throws DataSourceException

  Return a particular attribute from a tuple (counting from one) as a 32 bit integer

    `DataSourceException`

### toString

    public void toString(java.lang.StringBuffer r)

  Produce a string representation of the result set, where {} indicates a set of values, and [] a list of values

### toString

    public java.lang.String toString()

  Produce a string representation of the AutoMedTuple

  Specified by:
    `toString` in class `AutoMedType`

### getAttributeType

    public int getAttributeType(int attributeNumber)

### 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