public CommandIterator(final List commands,final Command command,final boolean forward){
  if (commands == null || command == null)   throw new IllegalArgumentException();
  fIterator=forward ? commands.iterator() : new ReverseListIterator(commands.listIterator(commands.size()));
  fCommand=command;
  fForward=forward;
}

public CommandIterator ( final List commands , final Command command , final boolean forward ) { if ( commands == null || command == null ) throw new IllegalArgumentException ( ) ; fIterator = forward ? commands . iterator ( ) : new ReverseListIterator ( commands . listIterator ( commands . size ( ) ) ) ; fCommand = command ; fForward = forward ; }
creates a command iterator .
