|
NetLogo API version 3.1.5 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Argument
Interface provides access to arguments passed to the perform
or report methods of a primitive at run-time.
Arguments are created by NetLogo and passed to the
perform or report methods of your
primitive.
Command.perform(Argument[], Context),
Reporter.report(Argument[], Context)| Method Summary | |
|---|---|
Object |
get()
Returns the argument as an Object without type checking. |
Agent |
getAgent()
Returns the argument as an Agent. |
Boolean |
getBoolean()
Returns the argument as a Boolean |
boolean |
getBooleanValue()
Returns the value of the argument as a boolean |
double |
getDoubleValue()
Returns the value of the argument as a double. |
float |
getFloatValue()
Returns the value of the argument as a float. |
int |
getIntegerValue()
Returns the value of the argument as an int. |
LogoList |
getList()
Returns the argument as a org.nlogo.api.LogoList |
Number |
getNumber()
Returns the argument as a Number. |
Patch |
getPatch()
Returns the argument as an org.nlogo.api.Patch |
String |
getString()
Returns the argument as a String |
Turtle |
getTurtle()
Returns the argument as a org.nlogo.api.Turtle. |
| Method Detail |
|---|
Object get()
throws ExtensionException
Object without type checking.
ExtensionException
Agent getAgent()
throws ExtensionException
Agent.
ExtensionException - if the argument is not an Agent
Boolean getBoolean()
throws ExtensionException
Boolean
ExtensionException - if the argument is not a Boolean
boolean getBooleanValue()
throws ExtensionException
ExtensionException - if the argument is not a boolean
double getDoubleValue()
throws ExtensionException
double.
ExtensionException - if the argument is not a double
float getFloatValue()
throws ExtensionException
float.
ExtensionException - if the argument is not a float
int getIntegerValue()
throws ExtensionException
int.
ExtensionException - if the argument is not an int
LogoList getList()
throws ExtensionException
org.nlogo.api.LogoList
ExtensionException - if the argument is not a LogoList
Number getNumber()
throws ExtensionException
Number.
ExtensionException - if the argument is not a Number
Patch getPatch()
throws ExtensionException
org.nlogo.api.Patch
ExtensionException - if the argument is not a Patch
String getString()
throws ExtensionException
String
ExtensionException - if the argument cannot be cast to a String
Turtle getTurtle()
throws ExtensionException
org.nlogo.api.Turtle.
ExtensionException - if the argument is not a Turtle
|
NetLogo API version 3.1.5 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||