Class CommandList

java.lang.Object
jp.vmi.selenium.selenese.command.CommandList
All Implemented Interfaces:
Iterable<ICommand>

public class CommandList
extends Object
implements Iterable<ICommand>
Command list.
  • Constructor Details

    • CommandList

      public CommandList()
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Returns true if this list contains no elements.
      Returns:
      true if this list contains no elements.
    • size

      public int size()
      Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
      Returns:
      the number of elements in this list.
    • add

      public boolean add​(ICommand command)
      Add command.
      Parameters:
      command - command.
      Returns:
      true if this collection changed as a result of the call. (for keeping compatibility)
    • indexOf

      public int indexOf​(Object key)
      Get index by label or command.
      Parameters:
      key - label string or ICommand object.
      Returns:
      index or -1.
    • originalListIterator

      protected ListIterator<ICommand> originalListIterator​(int index)
      Original list iterator. see ArrayList.listIterator(int)
      Parameters:
      index - start index.
      Returns:
      ListIterator.
    • iterator

      public CommandListIterator iterator()
      Specified by:
      iterator in interface Iterable<ICommand>
    • iterator

      public CommandListIterator iterator​(CommandListIterator parentIterator)
      Create the iterator of this command list.
      Parameters:
      parentIterator - parent iterator.
      Returns:
      iterator.
    • doCommand

      protected Result doCommand​(Context context, ICommand command, String... curArgs)
    • evalCurArgs

      protected void evalCurArgs​(Context context, String[] curArgs)
    • execute

      public Result execute​(Context context, CommandResultList cresultList)
      Execute command list.
      Parameters:
      context - Selenese Runner context.
      cresultList - command result list for keeping all command results.
      Returns:
      result of command list execution.
    • toString

      public String toString()
      Overrides:
      toString in class Object