|
NetLogo API version 2.1.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface specifies the main class of a NetLogo extension. All NetLogo extensions must include a class that implements this interface. Registers primitives with NetLogo and handles extension initialization and deconstruction.
For example:
public class FibonacciExtension extends org.nlogo.api.DefaultClassManager
{
public void load(org.nlogo.api.PrimitiveManager primManager)
{
primManager.addPrimitive("first-n-fibs", new Fibonacci());
}
}
| Method Summary | |
void |
load(PrimitiveManager primManager)
Loads the primitives in the extension. |
void |
runOnce()
Initializes the extension. |
void |
unload()
Cleans up the extension. |
| Method Detail |
public void runOnce()
throws ExtensionException
ExtensionException
public void load(PrimitiveManager primManager)
throws ExtensionException
primManager - The manager to transport the primitives to NetLogo
ExtensionException
public void unload()
throws ExtensionException
load is called.
ExtensionException
|
NetLogo API version 2.1.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||