NetLogo API
version 2.1.0

org.nlogo.api
Class DefaultReporter

java.lang.Object
  extended byorg.nlogo.api.DefaultReporter
All Implemented Interfaces:
Primitive, Reporter

public abstract class DefaultReporter
extends Object
implements Reporter

Partial implementation of Reporter provides common implentations of some methods. Implements every method except report(...).


Constructor Summary
DefaultReporter()
           
 
Method Summary
 String getAgentClassString()
          Indicates that this primitive can be used by any agent.
 Syntax getSyntax()
          Indicates that this reporter takes no arguments and returns a number.
 Reporter 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.Reporter
report
 

Constructor Detail

DefaultReporter

public DefaultReporter()
Method Detail

getAgentClassString

public String getAgentClassString()
Indicates that this primitive can be used by any agent.

Specified by:
getAgentClassString in interface Primitive
Returns:
"OTP"

getSyntax

public Syntax getSyntax()
Indicates that this reporter takes no arguments and returns a number.

Specified by:
getSyntax in interface Primitive
Returns:
Syntax.reporterSyntax( Syntax.TYPE_NUMBER )
See Also:
Syntax

newInstance

public Reporter newInstance(String name)
Returns a new instance of this class, created by invoking the empty constructor.

Specified by:
newInstance in interface Reporter
Parameters:
name - the name that was found in the code (without the JAR identifer)
Returns:
(Reporter) this.getClass().newInstance()

NetLogo API
version 2.1.0