package bvyy.command; // Copyright(C)1998 Brian Yap // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for // more details. // You should have received a copy of the GNU General Public License along with // this program; if not, write to the Free Software Foundation, Inc., 675 Mass // Ave, Cambridge, MA 02139, USA. /** * The command set allows for sequences of commands (order is very important * as is has semantic meaning) and allows command to contain commands. * * @version 0.0.1 27 October 1998 * @author (c)1998 Brian Voon Yee Yap */ public class CommandSet extends Command implements Serializable{ private java.util.Vector commandList; /** * Creates an empty command set. */ public CommandSet() { super(); } /** * Creates an empty command set with a description of S. * * @param s the event description. */ public CommandSet(String s) { super(s); } /** * Allows replacement of the current command list with a new command list. * All current commands are lost.

* * Note: The command set comes with it's own command list so it will not * normally be necessary to call this function.

* * It a null command list is supplied it will be ignored. * * @param newCommandList the list that replaces the current list. */ public void setCommandList(java.util.Vector newCommandList) { if (newCommandList != null) { commandList = newCommandList; } } /** * Returns the current command list. The command list is a vector and this * allows modification this list using the normal vector functions.

* * For example: comandSet.getCommandList.addElement(CommandX);

* * @see java.util.vector */ public java.util.Vector getCommandList() { return commandList; } }