Building Parsers with Java

sjm.imperative
Class Command

java.lang.Object
  |
  +--sjm.imperative.Command
Direct Known Subclasses:
AddFunctionCommand, AssignFunctionCommand, AssignmentCommand, CommandSequence, ForCommand, IfCommand, NullCommand, PrintlnCommand, ReadCommand, WhileCommand

public abstract class Command
extends java.lang.Object

This abstract class represents a hierarchy of classes that encapsulate commands. A command object is a request that is dormant until a caller asks it to execute.

Subclasses typically encapsulate some primary function, and allow for parameters that tailor a command to a purpose. All subclasses must implement an execute command, which is abstract here.


Constructor Summary
Command()
           
 
Method Summary
abstract  void execute()
          Perform the request encapsulated in this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command()
Method Detail

execute

public abstract void execute()
Perform the request encapsulated in this command.

by Steve Metsker