NetLogo API
version 2.1.0
A C D E G H I L M N O P R S T U W

A

Agent - interface org.nlogo.api.Agent.
Interface provides access to NetLogo agents.
App - class org.nlogo.app.App.
The main class for the complete NetLogo application.
Argument - interface org.nlogo.api.Argument.
Interface provides access to arguments passed to the perform or report methods of a primitive at run-time.
addConfigurable(Configurable) - Method in interface org.nlogo.api.PrimitiveManager
 
addLinkComponent(Object) - Method in class org.nlogo.app.App
Internal use only.
addPrimitive(String, Primitive) - Method in interface org.nlogo.api.PrimitiveManager
Adds a new primitive.
app - Static variable in class org.nlogo.app.App
Once main() has been called, holds the singleton instance of this class.
attachCurrentDirectory(String) - Method in interface org.nlogo.api.Context
Transforms a relative path to an absolute path by prepending the current working directory.
attachModelDir(String) - Method in interface org.nlogo.api.Context
Transforms a relative path to a model into an absolute path by prepending the current model directory.

C

COMMAND_PRECEDENCE - Static variable in class org.nlogo.api.Syntax
 
ClassManager - interface org.nlogo.api.ClassManager.
Interface specifies the main class of a NetLogo extension.
Command - interface org.nlogo.api.Command.
Interface for NetLogo extension commands.
CompilerException - exception org.nlogo.compiler.CompilerException.
Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid.
CompilerException(String, Token) - Constructor for class org.nlogo.compiler.CompilerException
 
Configurable - interface org.nlogo.api.Configurable.
A marker interface for a class that is configurable.
Context - interface org.nlogo.api.Context.
Provides access to the current execution environment.
clearOutput() - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
command(String) - Method in class org.nlogo.app.App
Runs NetLogo commands and waits for them to complete.
command(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Runs NetLogo commands and waits for them to complete.
commandLater(String) - Method in class org.nlogo.app.App
Runs NetLogo commands in the background.
commandSyntax() - Static method in class org.nlogo.api.Syntax
Returns an EMPTY_SYNTAX Object for commands with no arguments.
commandSyntax(int[]) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for commands with one or more right arguments.
commandSyntax(int[], int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for commands with a variable number of arguments.
compile() - Method in class org.nlogo.app.App
Recompiles the model.
context - Variable in class org.nlogo.nvm.LogoException
internal use only
createPatchesNotify() - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.

D

DefaultClassManager - class org.nlogo.api.DefaultClassManager.
An abstract, partial implementation of ClassManager that implements runOnce() and unload() with empty methods.
DefaultClassManager() - Constructor for class org.nlogo.api.DefaultClassManager
 
DefaultCommand - class org.nlogo.api.DefaultCommand.
Partial implementation of Command provides common implentations of some methods.
DefaultCommand() - Constructor for class org.nlogo.api.DefaultCommand
 
DefaultReporter - class org.nlogo.api.DefaultReporter.
Partial implementation of Reporter provides common implentations of some methods.
DefaultReporter() - Constructor for class org.nlogo.api.DefaultReporter
 
dispose() - Method in class org.nlogo.workspace.HeadlessWorkspace
Shuts down the background thread associated with this workspace, allowing resources to be freed.

E

ExtensionException - exception org.nlogo.api.ExtensionException.
Wrapper class for exceptions thrown by NetLogo extensions.
ExtensionException(String) - Constructor for class org.nlogo.api.ExtensionException
Creates a new ExtensionException
ExtensionException(Exception) - Constructor for class org.nlogo.api.ExtensionException
Creates a new ExtensionException
exportGraphics(String, String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Not implemented.
exportInterface(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Not implemented.

G

get() - Method in interface org.nlogo.api.Argument
Returns the argument as an Object without type checking.
getAgent() - Method in interface org.nlogo.api.Argument
Returns the argument as an Agent.
getAgent() - Method in interface org.nlogo.api.Context
Returns the agent that is currently executing this code.
getAgentClassString() - Method in class org.nlogo.api.DefaultCommand
Indicates that this primitive can be used by any agent.
getAgentClassString() - Method in class org.nlogo.api.DefaultReporter
Indicates that this primitive can be used by any agent.
getAgentClassString() - Method in interface org.nlogo.api.Primitive
Returns a String which specifies in which context this primitive is allowed.
getBoolean() - Method in interface org.nlogo.api.Argument
Returns the argument as a Boolean
getBooleanValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as a boolean
getConfigurables() - Method in interface org.nlogo.api.PrimitiveManager
 
getDescription() - Method in class org.nlogo.compiler.CompilerException
Returns the error message produced by the compiler
getDfault() - Method in class org.nlogo.api.Syntax
 
getDoubleValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as a double.
getEndPosition() - Method in class org.nlogo.compiler.CompilerException
Returns the index of the end of the portion of the code in which the error was found.
getFileName() - Method in class org.nlogo.compiler.CompilerException
 
getFloatValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as a float.
getIntegerValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as an int.
getLeft() - Method in class org.nlogo.api.Syntax
 
getLinkComponents() - Method in class org.nlogo.app.App
Internal use only.
getList() - Method in interface org.nlogo.api.Argument
Returns the argument as a org.nlogo.agent.LogoList
getNumber() - Method in interface org.nlogo.api.Argument
Returns the argument as a Number.
getPatch() - Method in interface org.nlogo.api.Argument
Returns the argument as an org.nlogo.agent.Patch
getPrecedence() - Method in class org.nlogo.api.Syntax
 
getProcedures() - Method in class org.nlogo.app.App
Returns the contents of the Procedures tab.
getRet() - Method in class org.nlogo.api.Syntax
 
getRight() - Method in class org.nlogo.api.Syntax
 
getStartPosition() - Method in class org.nlogo.compiler.CompilerException
Returns the index of the start of the portion of the code in which the error was found.
getString() - Method in interface org.nlogo.api.Argument
Returns the argument as a String
getSwitchesBoolean() - Method in interface org.nlogo.api.Command
Specifies whether NetLogo should "switch" to another turtle after running this command.
getSwitchesBoolean() - Method in class org.nlogo.api.DefaultCommand
Indicates that NetLogo does not need to switch agents after executing this command.
getSyntax() - Method in class org.nlogo.api.DefaultCommand
Indicates that this command takes no arguments.
getSyntax() - Method in class org.nlogo.api.DefaultReporter
Indicates that this reporter takes no arguments and returns a number.
getSyntax() - Method in interface org.nlogo.api.Primitive
Returns Syntax which specifies the syntax that is acceptable for this primitive.
getTurtle() - Method in interface org.nlogo.api.Argument
Returns the argument as a org.nlogo.agent.Turtle.

H

HeadlessWorkspace - class org.nlogo.workspace.HeadlessWorkspace.
The main class for headless (no GUI) operation of NetLogo.
HeadlessWorkspace() - Constructor for class org.nlogo.workspace.HeadlessWorkspace
Makes a new instance of NetLogo capable of running a model "headless", with no GUI.
handle(Throwable) - Method in class org.nlogo.app.App
Internal use only.
handleAppEvent(AppEvent) - Method in class org.nlogo.app.App
Internal use only.
handleBeforeLoadEvent(BeforeLoadEvent) - Method in class org.nlogo.app.App
Internal use only.
handleLoadBeginEvent(LoadBeginEvent) - Method in class org.nlogo.app.App
Internal use only.
handleLoadEndEvent(LoadEndEvent) - Method in class org.nlogo.app.App
Internal use only.
handleModelSavedEvent(ModelSavedEvent) - Method in class org.nlogo.app.App
Internal use only.
handleSwitchedTabsEvent(SwitchedTabsEvent) - Method in class org.nlogo.app.App
Internal use only.
headless() - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.

I

initForTesting(int, int) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
initForTesting(int, int, String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
inspectAgent(Class, Agent) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
instruction - Variable in class org.nlogo.nvm.LogoException
internal use only

L

LogoException - exception org.nlogo.nvm.LogoException.
A runtime error that has occurred in NetLogo code.
LogoException(String) - Constructor for class org.nlogo.nvm.LogoException
internal use only
LogoException(Instruction, String) - Constructor for class org.nlogo.nvm.LogoException
internal use only
LogoList - class org.nlogo.agent.LogoList.
 
LogoList() - Constructor for class org.nlogo.agent.LogoList
 
LogoList(int) - Constructor for class org.nlogo.agent.LogoList
 
LogoList(Collection) - Constructor for class org.nlogo.agent.LogoList
 
lastLogoException - Variable in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
load(PrimitiveManager) - Method in interface org.nlogo.api.ClassManager
Loads the primitives in the extension.
load(PrimitiveManager) - Method in class org.nlogo.api.DefaultClassManager
Loads the primitives in the extension.

M

MAX_PRECEDENCE - Static variable in class org.nlogo.api.Syntax
 
magicOpen(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
main(String[]) - Static method in class org.nlogo.app.App
Should be called once at startup to create the application and start it running.
makeWidget(String) - Method in class org.nlogo.app.App
Adds new widget to Interface tab given its specification, in the same (undocumented) format found in a saved model.

N

NORMAL_PRECEDENCE - Static variable in class org.nlogo.api.Syntax
 
newInstance(String) - Method in interface org.nlogo.api.Command
Returns a new instance of this Command.
newInstance(String) - Method in class org.nlogo.api.DefaultCommand
Returns a new instance of this class, created by invoking the empty constructor.
newInstance(String) - Method in class org.nlogo.api.DefaultReporter
Returns a new instance of this class, created by invoking the empty constructor.
newInstance(String) - Method in interface org.nlogo.api.Reporter
Returns a new instance of this Reporter.

O

open(String) - Method in class org.nlogo.app.App
Opens a model stored in a file.
open(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Opens a model stored in a file.
openFromSource(String, String) - Method in class org.nlogo.app.App
Opens a model stored in a string.
openFromSource(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Opens a model stored in a string.
org.nlogo.api - package org.nlogo.api
Provides classes associated with the NetLogo Extensions API.
ownerFinished(JobOwner) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.

P

Patch - interface org.nlogo.api.Patch.
Interface provides access to NetLogo patches.
Primitive - interface org.nlogo.api.Primitive.
Top-level interface for primitives (commands or reporters).
PrimitiveManager - interface org.nlogo.api.PrimitiveManager.
PrimitiveManager ships extension primitives and associated names to NetLogo.
pauseProgram() - Method in interface org.nlogo.api.Context
Undocumented method.
perform(Argument[], Context) - Method in interface org.nlogo.api.Command
Executes this Command.
periodicUpdate() - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
pressButton(String) - Method in class org.nlogo.app.App
Not currently supported.

R

Reporter - interface org.nlogo.api.Reporter.
Interface for NetLogo reporters.
report(Argument[], Context) - Method in interface org.nlogo.api.Reporter
Executes this Reporter.
report(String) - Method in class org.nlogo.app.App
Runs a NetLogo reporter.
report(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Runs a NetLogo reporter.
reporterSyntax(int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with no arguments
reporterSyntax(int, int[], int, int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with infix arguments.
reporterSyntax(int[], int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with one or more right arguments
reporterSyntax(int[], int, int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with a variable number of arguments.
requestFocus() - Method in class org.nlogo.app.App
Internal use only.
resizeWorld(int, int) - Method in class org.nlogo.workspace.HeadlessWorkspace
Not implemented.
resumeProgram() - Method in interface org.nlogo.api.Context
Undocumented method.
rethrow(Context, Instruction) - Method in class org.nlogo.nvm.LogoException
internal use only
runCommand(String, boolean) - Method in interface org.nlogo.api.Context
Runs a command as if it were written in the Command Center.
runOnce() - Method in interface org.nlogo.api.ClassManager
Initializes the extension.
runOnce() - Method in class org.nlogo.api.DefaultClassManager
Empty implementation.
runReporter(String) - Method in interface org.nlogo.api.Context
Runs a reporter as if it were written in the Command Center.
runtimeError(JobOwner, Context, Instruction, Exception) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.

S

Syntax - class org.nlogo.api.Syntax.
Specifies the arguments accepted by a primitive.
selectTab(int) - Method in class org.nlogo.app.App
Switches tabs.
setModelPath(String) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
setModelType(int) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
setProcedures(String) - Method in class org.nlogo.app.App
Replaces the contents of the Procedures tab.
setVariable(Argument, Object) - Method in interface org.nlogo.api.Context
Undocumented method.

T

TEST_DECLARATIONS - Static variable in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.
TYPE_AGENT - Static variable in class org.nlogo.api.Syntax
Type constant for set of agents.
TYPE_AGENTSET - Static variable in class org.nlogo.api.Syntax
Type constant for set of agents.
TYPE_BOOLEAN - Static variable in class org.nlogo.api.Syntax
Type constant for boolean.
TYPE_BOOLEAN_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_BRACKETED - Static variable in class org.nlogo.api.Syntax
 
TYPE_COMMAND_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_FLOAT - Static variable in class org.nlogo.api.Syntax
Unsupported.
TYPE_INTEGER - Static variable in class org.nlogo.api.Syntax
Unsupported.
TYPE_LIST - Static variable in class org.nlogo.api.Syntax
Type constant for list.
TYPE_NOBODY - Static variable in class org.nlogo.api.Syntax
 
TYPE_NUMBER - Static variable in class org.nlogo.api.Syntax
Type constant for number (integer or floating point).
TYPE_NUMBER_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_OTHER_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_PATCH - Static variable in class org.nlogo.api.Syntax
Type constant for set of patch.
TYPE_PATCHSET - Static variable in class org.nlogo.api.Syntax
Type constant for set of patches.
TYPE_READABLE - Static variable in class org.nlogo.api.Syntax
 
TYPE_REFERENCE - Static variable in class org.nlogo.api.Syntax
 
TYPE_REPEATABLE - Static variable in class org.nlogo.api.Syntax
 
TYPE_REPORTER_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_STRING - Static variable in class org.nlogo.api.Syntax
Type constant for string.
TYPE_TURTLE - Static variable in class org.nlogo.api.Syntax
Type constant for set of turtle.
TYPE_TURTLESET - Static variable in class org.nlogo.api.Syntax
Type constant for set of turtles.
TYPE_VOID - Static variable in class org.nlogo.api.Syntax
Unsupported.
TYPE_WILDCARD - Static variable in class org.nlogo.api.Syntax
 
Turtle - interface org.nlogo.api.Turtle.
Interface provides access to NetLogo turtles.
toString() - Method in class org.nlogo.compiler.CompilerException
Synonymous with getDescription().

U

unload() - Method in interface org.nlogo.api.ClassManager
Cleans up the extension.
unload() - Method in class org.nlogo.api.DefaultClassManager
Empty implementation.
updateDisplay(boolean) - Method in class org.nlogo.workspace.HeadlessWorkspace
Internal use only.

W

workspace - Variable in class org.nlogo.app.App
 

A C D E G H I L M N O P R S T U W
NetLogo API
version 2.1.0