com.sas.util
Class AbstractCommand

java.lang.Object
  |
  +--com.sas.util.AbstractCommand
All Implemented Interfaces:
Command, PublicClonable, SimpleCommand, StringDataInterface
Direct Known Subclasses:
ComposeMessageCommand

public abstract class AbstractCommand
extends java.lang.Object
implements Command, java.io.Serializable

AbstractCommand is an abstract Command that is executable and only requires the execute() method to be overridden.

See Also:
Serialized Form

Constructor Summary
AbstractCommand()
          Default Constructor.
 
Method Summary
abstract  Object clone()
          Commands are clonable.
abstract  void execute(Object arg)
          This does nothing.
 String getText()
          Return the text.
 boolean isExecutable()
          Return true, this Command is executable.
 boolean isUndoable()
          Return false, this Command is not Undoable.
 void setText(String txt)
          Set the text of the AbstractCommand.
 void undo()
          This does nothing.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Default Constructor.
Method Detail

clone

public abstract Object clone()
                      throws CloneNotSupportedException
Description copied from interface: Command
Commands are clonable. The framework which uses commands may clone a Command object after invoking it, if it wishes to store the command on an undo history or otherwise maintain a reference to the Command object. The clone should preserve the undo information so that the cloned command stored on an undo history may be undone.
Specified by:
clone in interface Command
Overrides:
clone in class Object
Following copied from interface: com.sas.util.Command
Returns:
the cloned object.
Throws:
CloneNotSupportedException - if the command cannot be cloned.

isExecutable

public boolean isExecutable()
Return true, this Command is executable.
Specified by:
isExecutable in interface Command
Returns:
true, this Command is executable

isUndoable

public boolean isUndoable()
Return false, this Command is not Undoable.
Specified by:
isUndoable in interface Command
Returns:
false, this Command is not Undoable

undo

public void undo()
This does nothing.
Specified by:
undo in interface Command
Following copied from interface: com.sas.util.Command
See Also:
SimpleCommand.execute(Object)

execute

public abstract void execute(Object arg)
This does nothing.
Specified by:
execute in interface SimpleCommand
Following copied from interface: com.sas.util.SimpleCommand
Parameters:
arg - an argument which the caller wishes to pass to the command. The arg may be null if no information is needed.

getText

public String getText()
Return the text.
Specified by:
getText in interface StringDataInterface
Returns:
text

setText

public void setText(String txt)
Set the text of the AbstractCommand.
Specified by:
setText in interface StringDataInterface
Parameters:
txt - the text




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Thu, 16 Feb 2006 02:30:16