|
NetLogo API version 3.1.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
Interface for NetLogo extension commands. Commands are primitives that do not return a value. All new commands must implement this interface.
Method Summary | |
---|---|
boolean |
getSwitchesBoolean()
Specifies whether NetLogo should "switch" to another turtle after running this command. |
Command |
newInstance(String name)
Returns a new instance of this Command . |
void |
perform(Argument[] args,
Context context)
Executes this Command . |
Methods inherited from interface org.nlogo.api.Primitive |
---|
getAgentClassString, getSyntax |
Method Detail |
---|
boolean getSwitchesBoolean()
Command
affects the state of the world (changing a variable, changing
graphics, etc.)
true
if a switch should occur, false
otherwise.Command newInstance(String name)
Command
. Called by NetLogo
every time this Command
is encountered during compilation.
name
- the name that was found in the code (without the JAR identifer)
Command
to be peformed during runtimevoid perform(Argument[] args, Context context) throws ExtensionException
Command
. Called by NetLogo when this Command
is called at run-time.
args
- the Argument
s that were passed to
the command. (May be a Reporter
or a constant.)
To evaluate arguments, use the typesafe methods in the Argument
interface.context
- the current Context
allows access to NetLogo internal methods
ExtensionException
|
NetLogo API version 3.1.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |