java.lang.Object org.nlogo.api.DefaultCommand
public abstract class DefaultCommand
Partial implementation of Command provides common implentations
of some methods.
Implements every method except Command.perform(...)
.
Constructor Summary | |
---|---|
DefaultCommand()
|
Method Summary | |
---|---|
String |
getAgentClassString()
Indicates that this primitive can be used by any agent. |
boolean |
getSwitchesBoolean()
Indicates that NetLogo does not need to switch agents after executing this command. |
Syntax |
getSyntax()
Indicates that this command takes no arguments. |
Command |
newInstance(String name)
Returns a new instance of this class, created by invoking the empty constructor. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.nlogo.api.Command |
---|
perform |
Constructor Detail |
---|
public DefaultCommand()
Method Detail |
---|
public String getAgentClassString()
getAgentClassString
in interface Primitive
"OTPL"
public Syntax getSyntax()
getSyntax
in interface Primitive
Syntax.commandSyntax()
Syntax
public boolean getSwitchesBoolean()
getSwitchesBoolean
in interface Command
true
if a switch should occur, false
otherwise.public Command newInstance(String name)
newInstance
in interface Command
name
- the name that was found in the code (without the JAR identifer)
(Command) this.getClass().newInstance()