|
Hyades Datapool Specification | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class provides base level iteration support for datapools. The iteration model used requires the iterator object be initialized and incremented to update the current record being acted upon. This allows for multiple calls to fetch the current object within the iteration loop.
iterator.dpInitialize(datapool);
while ( ! iterator.dpDone() )
{
String variable1 = iterator.dpString(0);
int variable2 = iterator.dpInt(1);
IDatapoolRecord = iterator.dpCurrent();
...
iterator.dpNext();
}
*** alternatives could include incrementing the iterator on the dpCurrent() and not requiring the dpNext().
Method Summary | |
boolean |
dpBoolean(int recordIndex)
Shortcut to the int value in the cell in the current record and
the specified record index is returned. |
boolean |
dpBoolean(java.lang.String variableName)
Shortcut to the boolean value in the cell in the current row and
the specified variable name is returned. |
byte |
dpByte(int recordIndex)
Shortcut to the byte value in the cell in the current record and
the specified record index is returned. |
byte |
dpByte(java.lang.String variableName)
Shortcut to the byte value in the cell in the current row and
the specified variable name is returned. |
char |
dpChar(int recordIndex)
Shortcut to the int value in the cell in the current record and
the specified record index is returned. |
char |
dpChar(java.lang.String variableName)
Shortcut to the char value in the cell in the current row and
the specified variable name is returned. |
IDatapoolRecord |
dpCurrent()
The record currently available from this iterator for the associated instance of the datapool. |
boolean |
dpDone()
Returns true if the current iterator
value is null . |
double |
dpDouble(int recordIndex)
Shortcut to the double value in the cell in the current record and
the specified record index is returned. |
double |
dpDouble(java.lang.String variableName)
Shortcut to the double value in the cell in the current row and
the specified variable name is returned. |
float |
dpFloat(int recordIndex)
Shortcut to the float value in the cell in the current record and
the specified record index is returned. |
float |
dpFloat(java.lang.String variableName)
Shortcut to the float value in the cell in the current row and
the specified variable name is returned. |
void |
dpInitialize(IDatapool datapool)
This method acts the same way as dpInitialize with equivalence class specification
except that default
equivalence class is used. |
void |
dpInitialize(IDatapool datapool,
int equivalenceClassIndex)
Initialize the iterator sequence from the specified datapool object. |
int |
dpInt(int recordIndex)
Shortcut to the int value in the cell in the current record and
the specified record index is returned. |
int |
dpInt(java.lang.String variableName)
Shortcut to the int value in the cell in the current row and
the specified variable name is returned. |
long |
dpLong(int recordIndex)
Shortcut to the long value in the cell in the current record and
the specified record index is returned. |
long |
dpLong(java.lang.String variableName)
Shortcut to the long value in the cell in the current row and
the specified variable name is returned. |
void |
dpNext()
Increments the iterator associated with an instance of the datapool. |
void |
dpReset()
Restart the iterator associated with an instance of the datapool. |
short |
dpShort(int recordIndex)
Shortcut to the short value in the cell in the current record and
the specified record index is returned. |
short |
dpShort(java.lang.String variableName)
Shortcut to the short value in the cell in the current row and
the specified variable name is returned. |
java.lang.String |
dpString(int recordIndex)
Shortcut to the String value in the cell in the current record and
the specified record index is returned. |
java.lang.String |
dpString(java.lang.String variableName)
Shortcut to the String value in the cell in the current record and
the specified variable name is returned. |
java.lang.Object |
dpValue(int recordIndex)
Shortcut to the value in the cell in the current record and
the specified record index is returned. |
java.lang.Object |
dpValue(java.lang.String variableName)
Shortcut to the value in the cell in the current record and
the specified variable name is returned. |
IDatapool |
getDatapool()
The datapool being iterated over. |
Method Detail |
public void dpInitialize(IDatapool datapool, int equivalenceClassIndex)
datapool
- The datapool to iterate over.equivalenceClassIndex
- The zero-based index of the equivalence
class that should be iterated over. If this value
is negative then all records in the datapool should be
will be available to the iterator.public void dpInitialize(IDatapool datapool)
dpInitialize with equivalence class specification
except that default
equivalence class is used.
datapool
- The datapool to iterate over.public IDatapool getDatapool()
null
is returned.
public IDatapoolRecord dpCurrent()
next method
. A value of null
is
returned when the iterator is out of values.
null
.dpNext()
,
dpDone()
,
dpReset()
public boolean dpDone()
true
if the current
iterator
value is null
.
dpCurrent()
,
dpNext()
,
dpReset()
public void dpNext()
dpCurrent()
,
dpDone()
,
dpReset()
public void dpReset()
dpCurrent()
,
dpDone()
,
dpNext()
public java.lang.Object dpValue(int recordIndex)
current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
recordIndex
- The zero based index of the cell in the record.
current
record and
at the specified index.dpValue(String)
public java.lang.Object dpValue(java.lang.String variableName)
current
record and
the specified variable name is returned.
variableName
- The variable name to locate the cell by.
current
record and
the specified variable name.dpValue(int)
public java.lang.String dpString(int recordIndex)
String
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
recordIndex
- The zero based index of the cell in the record.
current
record and
at the specified index.dpString(String)
public java.lang.String dpString(java.lang.String variableName)
String
value in the cell in the current
record and
the specified variable name is returned.
If the value in the cell is not a String
value then it is
converted to a String
before being returned.
variableName
- The valiable name to locate the cell by.
String
value in the cell in the current
record and
the specified variable name.dpString(int)
public long dpLong(int recordIndex)
long
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
recordIndex
- The zero based index of the cell in the record.
current
record and
at the specified index.dpLong(String)
public long dpLong(java.lang.String variableName)
long
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a long
value then an attempt
is made to convert the value to a long
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
variableName
- The variable name to locate the cell by.
long
value in the cell in the current
row and
the specified variable name.dpLong(int)
public int dpInt(int recordIndex)
int
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a int
value then an attempt
is made to convert the value to a int
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
recordIndex
- The zero based index of the cell in the record.
int
value in the cell in the current
record and
at the specified index.dpInt(String)
public int dpInt(java.lang.String variableName)
int
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a int
value then an attempt
is made to convert the value to a int
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
variableName
- The variable name to locate the cell by.
int
value in the cell in the current
row and
the specified variable name.dpInt(int)
public short dpShort(int recordIndex)
short
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a short
value then an attempt
is made to convert the value to a short
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
recordIndex
- The zero based index of the cell in the record.
short
value in the cell in the current
record and
at the specified index.dpShort(String)
public short dpShort(java.lang.String variableName)
short
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a short
value then an attempt
is made to convert the value to a short
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
variableName
- The variable name to locate the cell by.
short
value in the cell in the current
row and
the specified variable name.dpShort(int)
public byte dpByte(int recordIndex)
byte
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a byte
value then an attempt
is made to convert the value to a byte
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
recordIndex
- The zero based index of the cell in the record.
byte
value in the cell in the current
record and
at the specified index.dpByte(String)
public byte dpByte(java.lang.String variableName)
byte
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a byte
value then an attempt
is made to convert the value to a byte
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
variableName
- The variable name to locate the cell by.
byte
value in the cell in the current
row and
the specified variable name.dpByte(int)
public double dpDouble(int recordIndex)
double
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a double
value then an attempt
is made to convert the value to a double
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
recordIndex
- The zero based index of the cell in the record.
double
value in the cell in the current
record and
at the specified index.dpDouble(String)
public double dpDouble(java.lang.String variableName)
double
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a double
value then an attempt
is made to convert the value to a double
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
variableName
- The variable name to locate the cell by.
double
value in the cell in the current
row and
the specified variable name.dpDouble(int)
public float dpFloat(int recordIndex)
float
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a float
value then an attempt
is made to convert the value to a float
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
recordIndex
- The zero based index of the cell in the record.
float
value in the cell in the current
record and
at the specified index.dpFloat(String)
public float dpFloat(java.lang.String variableName)
float
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a float
value then an attempt
is made to convert the value to a float
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
variableName
- The variable name to locate the cell by.
float
value in the cell in the current
row and
the specified variable name.dpFloat(int)
public boolean dpBoolean(int recordIndex)
int
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a boolean
value then an attempt
is made to convert the value to a boolean
. If the value can not
be converted an appropriate exception will be thrown.
recordIndex
- The zero based index of the cell in the record.
boolean
value in the cell in the current
record and
at the specified index.dpBoolean(String)
public boolean dpBoolean(java.lang.String variableName)
boolean
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a boolean
value then an attempt
is made to convert the value to a boolean
. If the value can not
be converted an appropriate exception will be thrown.
variableName
- The variable name to locate the cell by.
boolean
value in the cell in the current
row and
the specified variable name.dpBoolean(int)
public char dpChar(int recordIndex)
int
value in the cell in the current
record and
the specified record index is returned. The record index is the specified zero
based index for the cell.
If the value in the cell is not a char
value then an attempt
is made to convert the value to a char
. If more then one
character is represented in the value only the first character will be
returned.
recordIndex
- The zero based index of the cell in the record.
char
value in the cell in the current
record and
at the specified index.dpChar(String)
public char dpChar(java.lang.String variableName)
char
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a char
value then an attempt
is made to convert the value to a char
. If more then one
character is represented in the value only the first character will be
returned.
variableName
- The variable name to locate the cell by.
char
value in the cell in the current
row and
the specified variable name.dpChar(int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |