Package jp.vmi.selenium.selenese.command
Class CommandList
java.lang.Object
jp.vmi.selenium.selenese.command.CommandList
public class CommandList extends Object implements Iterable<ICommand>
Command list.
-
Constructor Summary
Constructors Constructor Description CommandList() -
Method Summary
Modifier and Type Method Description booleanadd(ICommand command)Add command.protected ResultdoCommand(Context context, ICommand command, String... curArgs)protected voidevalCurArgs(Context context, String[] curArgs)Resultexecute(Context context, CommandResultList cresultList)Execute command list.intindexOf(Object key)Get index by label or command.booleanisEmpty()Returnstrueif this list contains no elements.CommandListIteratoriterator()CommandListIteratoriterator(CommandListIterator parentIterator)Create the iterator of this command list.protected ListIterator<ICommand>originalListIterator(int index)Original list iterator.intsize()Returns the number of elements in this list.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CommandList
public CommandList()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returnstrueif this list contains no elements.- Returns:
trueif this list contains no elements.
-
size
public int size()Returns the number of elements in this list. If this list contains more thanInteger.MAX_VALUEelements, returnsInteger.MAX_VALUE.- Returns:
- the number of elements in this list.
-
add
Add command.- Parameters:
command- command.- Returns:
- true if this collection changed as a result of the call. (for keeping compatibility)
-
indexOf
Get index by label or command.- Parameters:
key- label string or ICommand object.- Returns:
- index or -1.
-
originalListIterator
Original list iterator. seeArrayList.listIterator(int)- Parameters:
index- start index.- Returns:
- ListIterator.
-
iterator
-
iterator
Create the iterator of this command list.- Parameters:
parentIterator- parent iterator.- Returns:
- iterator.
-
doCommand
-
evalCurArgs
-
execute
Execute command list.- Parameters:
context- Selenese Runner context.cresultList- command result list for keeping all command results.- Returns:
- result of command list execution.
-
toString
-