|
NetLogo API version 2.0.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nlogo.api.Argument
Wrapper class holds an argument 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)
Constructor Summary | |
Argument(org.nlogo.nvm.Context context,
org.nlogo.command.Reporter arg)
Creates a new Argument. |
Method Summary | |
Object |
get()
Returns the argument as an Object without type checking. |
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.agent.LogoList |
Number |
getNumber()
Returns the argument as a Number . |
String |
getString()
Returns the argument as a String |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Argument(org.nlogo.nvm.Context context, org.nlogo.command.Reporter arg)
context
- arg
- Method Detail |
public Object get() throws ExtensionException
Object
without type checking.
ExtensionException
public Boolean getBoolean() throws ExtensionException
Boolean
ExtensionException
- if the argument is not a Boolean
public boolean getBooleanValue() throws ExtensionException
ExtensionException
- if the argument is not a boolean
public double getDoubleValue() throws ExtensionException
double
.
ExtensionException
- if the argument is not a double
public float getFloatValue() throws ExtensionException
float
.
ExtensionException
- if the argument is not a float
public int getIntegerValue() throws ExtensionException
int
.
ExtensionException
- if the argument is not an int
public LogoList getList() throws ExtensionException
org.nlogo.agent.LogoList
ExtensionException
- if the argument is not a LogoList
public Number getNumber() throws ExtensionException
Number
.
ExtensionException
- if the argument is not a Number
public String getString() throws ExtensionException
String
ExtensionException
- if the argument cannot be cast to a String
|
NetLogo API version 2.0.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |