|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester API Reference Project Version 2.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDatapoolIterator
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().
| Field Summary | |
|---|---|
static java.lang.String |
RANDOM_SEED
|
static java.lang.String |
WRAP
|
| Method Summary | |
|---|---|
boolean |
dpBoolean(int variableIndex)
Shortcut to the int value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the byte value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the int value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the double value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the float value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the int value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the long value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the short value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the String value in the cell in the current record and
the specified variable 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 variableIndex)
Shortcut to the value in the cell in the current record and
the specified variable 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. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Returns the Object associated with the specified property name. |
void |
setProperty(java.lang.String propertyName,
java.lang.Object propertyValue)
Sets the property with the specified name with a value captued in the Object. |
| Field Detail |
|---|
static final java.lang.String RANDOM_SEED
static final java.lang.String WRAP
| Method Detail |
|---|
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.void dpInitialize(IDatapool datapool)
dpInitialize with equivalence class specification
except that default
equivalence class is used.
datapool - The datapool to iterate over.IDatapool getDatapool()
null is returned.
IDatapoolRecord dpCurrent()
next method. A value of null is
returned when the iterator is out of values.
null.dpNext(),
dpDone(),
dpReset()boolean dpDone()
true if the current iterator
value is null.
dpCurrent(),
dpNext(),
dpReset()void dpNext()
dpCurrent(),
dpDone(),
dpReset()void dpReset()
dpCurrent(),
dpDone(),
dpNext()java.lang.Object dpValue(int variableIndex)
current record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
variableIndex - The zero based index of the cell in the record.
current record and
at the specified index.dpValue(String)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)java.lang.String dpString(int variableIndex)
String value in the cell in the current record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
variableIndex - The zero based index of the cell in the record.
current record and
at the specified index.dpString(String)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)long dpLong(int variableIndex)
long value in the cell in the current record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
variableIndex - The zero based index of the cell in the record.
current record and
at the specified index.dpLong(String)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)int dpInt(int variableIndex)
int value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)short dpShort(int variableIndex)
short value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)byte dpByte(int variableIndex)
byte value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)double dpDouble(int variableIndex)
double value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)float dpFloat(int variableIndex)
float value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)boolean dpBoolean(int variableIndex)
int value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)char dpChar(int variableIndex)
int value in the cell in the current record and
the specified variable index is returned. The variable 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.
variableIndex - 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)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)java.lang.Object getProperty(java.lang.String propertyName)
Object associated with the specified property name.
propertyName -
Object assoicated with the specified property name.
void setProperty(java.lang.String propertyName,
java.lang.Object propertyValue)
Object.
propertyName - propertyValue -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||