java.lang.Objectorg.nlogo.workspace.ExtensionPrimitiveManager
public class ExtensionPrimitiveManager
Field Summary | |
---|---|
String |
name
|
Constructor Summary | |
---|---|
ExtensionPrimitiveManager(String name)
|
Method Summary | |
---|---|
void |
addPrimitive(String name,
Primitive prim)
Adds a new primitive. |
boolean |
autoImportPrimitives()
|
void |
autoImportPrimitives(boolean val)
Should the primitives be automatically imported into the top-level NetLogo namespace. |
Primitive |
getPrimitive(String name)
Returns the primitive associated with a name. |
Iterator<String> |
getPrimitiveNames()
Returns the names of all imported primitives. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final String name
Constructor Detail |
---|
public ExtensionPrimitiveManager(String name)
Method Detail |
---|
public void addPrimitive(String name, Primitive prim)
PrimitiveManager
addPrimitive
in interface PrimitiveManager
name
- the name of the primitive that will be use in NetLogo codeprim
- an instance of Primitive
to associate with name
public Iterator<String> getPrimitiveNames()
public void autoImportPrimitives(boolean val)
PrimitiveManager
autoImportPrimitives
in interface PrimitiveManager
public boolean autoImportPrimitives()
autoImportPrimitives
in interface PrimitiveManager
public Primitive getPrimitive(String name)
name
- the name of the primitive
name
, or null
if
there isn't on