Java Reference
In-Depth Information
Figure 25.3. Command classes generally define themselves using terms that may be
variables, specific machines, or Boolean expressions.
The interpreter classes let you compose programs that control the machine line. Each class
interprets the execute() command in a way that is consistent with the class's name. For
example, the execute() method for StartupCommand is:
public void execute(Context c)
{
Machine m = term.eval(c);
m.startup();
}
For the ForMachines class, execute() is:
Search WWH ::




Custom Search