jurpe.system
Class CommandSequence

java.lang.Object
  extended by jurpe.system.CommandSequence
All Implemented Interfaces:
ICommand

public class CommandSequence
extends java.lang.Object
implements ICommand

Implements a sequence of commands to be executed.

Author:
Alessio Saltarin
See Also:
Command

Constructor Summary
CommandSequence()
          Build new command sequence
 
Method Summary
 void add(ICommand command)
          Add a command to be executed in sequence.
 boolean execute()
          Executes a command sequence.
 java.lang.String getLog()
          Returns log of every command executed in this sequence.
 java.util.AbstractList<java.lang.String> getLogItems()
          Returns the log as a List of Strings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandSequence

public CommandSequence()
Build new command sequence

Method Detail

add

public void add(ICommand command)
Add a command to be executed in sequence.

Parameters:
command - command to add to the sequence

execute

public boolean execute()
Executes a command sequence.

Specified by:
execute in interface ICommand
Returns:
true, if the last command returned true.

getLog

public java.lang.String getLog()
Returns log of every command executed in this sequence.

Specified by:
getLog in interface ICommand
Returns:
String separated by LF of every command executed by this sequence.

getLogItems

public java.util.AbstractList<java.lang.String> getLogItems()
Returns the log as a List of Strings

Returns:
List of Strings

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net