|
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 |
java.lang.Object com.rational.test.ft.script.Subitem com.rational.test.ft.script.List
public class List
Represents a sequence of subitems. For example, a node in a tree is represented as a sequence of nodes that
lead to the desired node, as in Music->Jazz->Louis Armstrong->Star Dust
.
A List
is represented in the script as an atPath
method
if all the members of the sequence are Text
or Index
values. If any value in the sequence is neither a Text
value nor an Index
value, or if any value in the sequence is a Text
value with an additional text index, an atList
method
is used in the script.
Examples of possible List
values in a script are:
List
subitems are represented as calls to
atPath
and atList
.
Constructor Summary | |
---|---|
List()
Creates an empty list of subitems. |
|
List(java.lang.String path)
Builds the list of subitems from a path specification. |
|
List(Subitem subitem)
Creates a single element list of subitems. |
|
List(Subitem[] subitems)
Creates a list of subitems from the specified array of subitems. |
|
List(Subitem subitem1, Subitem subitem2)
Creates a two-element list of subitems. |
|
List(Subitem subitem1, Subitem subitem2, Subitem subitem3)
Creates a three-element list of subitems. |
|
List(Subitem subitem1, Subitem subitem2, Subitem subitem3, Subitem subitem4)
Creates a four-element list of subitems. |
Method Summary | |
---|---|
void |
append(Subitem subitem)
Appends a subitem to the end of the existing list of subitems. |
void |
append(Subitem[] subitems)
Appends an array of subitems to the end of the existing list of subitems. |
boolean |
equals(java.lang.Object other)
Compares two List objects and returns true
if all elements in both lists are equal. |
static boolean |
equals(Subitem[] left, Subitem[] right)
Compares two arrays of subitem objects. |
Subitem |
getFirstSubitem()
Returns the first element in the list or null if the list is empty. |
Subitem |
getLastSubitem()
Returns the last element in the list or null if the list is empty. |
java.lang.String |
getPath()
Converts the active list of subitems into a path string that can be used by a script. |
Subitem |
getSubitem(int index)
Returns the subitem at the specified index in the list. |
int |
getSubitemCount()
Returns the number of subitems represented in the list. |
Subitem[] |
getSubitems()
Returns an array containing all subitems associated with this list. |
java.lang.String |
toString()
Returns a string representation of the subitems in the list. |
boolean |
usePath()
Returns true if the list of subitems should be represented as a path in a script. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public List()
public List(Subitem subitem)
subitem
- the first subitem in the new listpublic List(Subitem subitem1, Subitem subitem2)
subitem1
- the first subitem in the new listsubitem2
- the second subitem in the new listpublic List(Subitem subitem1, Subitem subitem2, Subitem subitem3)
subitem1
- the first subitem in the new listsubitem2
- the second subitem in the new listsubitem3
- the third subitem in the new listpublic List(Subitem subitem1, Subitem subitem2, Subitem subitem3, Subitem subitem4)
subitem1
- the first subitem in the new listsubitem2
- the second subitem in the new listsubitem3
- the third subitem in the new listsubitem4
- the fourth subitem in the new listpublic List(Subitem[] subitems)
subitems
- the array of subitems to use in the initial listpublic List(java.lang.String path)
Text
or Index
subitems separated by a ->
. Text
sequences are represented in raw form and cannot contain nested separator character sequences. Index
sequences are represented in an Index(int)
specification.
path
- the string representation of a series of subitems separated by a ->
sequence of charactersMethod Detail |
---|
public void append(Subitem subitem)
subitem
- the new subitem to append to the existing listpublic void append(Subitem[] subitems)
subitems
- the new subitems to append to the existing listpublic int getSubitemCount()
public Subitem getSubitem(int index)
getSubitemCount()
-1.
An index outside the range of available subitems causes a
java.lang.ArrayIndexOutOfBoundsException
exception to be thrown.
index
- the index of the desired subitempublic Subitem[] getSubitems()
public Subitem getFirstSubitem()
null
if the list is empty.
null
if the list is empty.public Subitem getLastSubitem()
null
if the list is empty.
null
if the list is empty.public boolean usePath()
true
if the list of subitems should be represented as a path in a script. The criterion for being considered a path in the script is that all subitems must be either a Text
subitem without a text index or an
Index
subitem.
true
if the list of subitems should be represented as a path in a scriptpublic java.lang.String getPath()
public boolean equals(java.lang.Object other)
List
objects and returns true
if all elements in both lists are equal. This is an ordered comparison of the nested subitem values.
equals
in class java.lang.Object
list
- the list of subitems to compare this list of subitems againstpublic static boolean equals(Subitem[] left, Subitem[] right)
List
objects and compares them.
left
- the left arrayright
- the right side of the compare true
if the values are the samepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |