public interface Reporter
Interface for NetLogo reporters. Reporters are primitives that return a value. All new reporters must implement this interface.
Note that NetLogo will not call your contructor directly, it will
call newInstance(String)
instead.
Method Summary | |
---|---|
Reporter |
newInstance(String name)
Returns a new instance of this Reporter . |
Object |
report(Argument[] args,
Context context)
Executes this Reporter . |
Methods inherited from interface org.nlogo.api.Primitive |
---|
getAgentClassString, getSyntax |
Method Detail |
---|
Reporter newInstance(String name)
Reporter
. Called by NetLogo
every time this Reporter
is encountered during compilation.
name
- the name that was found in the code (without the JAR identifer)
Reporter
to be called during runtimeObject report(Argument[] args, Context context) throws ExtensionException, LogoException
Reporter
. Called by NetLogo when this Reporter
is
called in a running
NetLogo model.
args
- The Argument
s that were included with
the command in the NetLogo code. (May be a Reporter
or a constant.)context
- The current Context
allows access to NetLogo internal methods.
ExtensionException
LogoException