java.lang.Objectorg.nlogo.nvm.Argument
public class Argument
Passes arguments to extension primitives.
| Constructor Summary | |
|---|---|
Argument(Context context,
         Reporter arg)
 | 
|
| 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. | 
 int | 
getIntValue()
Returns the value of the argument as an int. | 
 LogoList | 
getList()
Returns the argument as a org.nlogo.api.LogoList | 
 Patch | 
getPatch()
Returns the argument as an org.nlogo.api.Patch | 
 Reporter | 
getReporter()
Special (undocumented) method for the cities extension.  | 
 String | 
getString()
Returns the argument as a String | 
 Turtle | 
getTurtle()
Returns the argument as a org.nlogo.api.Turtle. | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Argument(Context context,
                Reporter arg)
| Method Detail | 
|---|
public Object get()
           throws LogoException
ArgumentObject without type checking.
get in interface ArgumentLogoException - if a LogoException occurred while evaluating this argument
public Agent getAgent()
               throws ExtensionException,
                      LogoException
ArgumentAgent.
getAgent in interface ArgumentExtensionException - if the argument is not an Agent
LogoException - if a LogoException occurred while evaluating this argument
public Boolean getBoolean()
                   throws ExtensionException,
                          LogoException
ArgumentBoolean
getBoolean in interface ArgumentExtensionException - if the argument is not a Boolean
LogoException - if a LogoException occurred while evaluating this argument
public boolean getBooleanValue()
                        throws ExtensionException,
                               LogoException
Argument
getBooleanValue in interface ArgumentExtensionException - if the argument is not a boolean
LogoException - if a LogoException occurred while evaluating this argument
public double getDoubleValue()
                      throws ExtensionException,
                             LogoException
Argumentdouble.
getDoubleValue in interface ArgumentExtensionException - if the argument is not a number.
LogoException - if a LogoException occurred while evaluating this argument
public int getIntValue()
                throws ExtensionException,
                       LogoException
Argumentint.
 Any fractional part is discarded.
getIntValue in interface ArgumentExtensionException - if the argument is not a number.
LogoException - if a LogoException occurred while evaluating this argument
public LogoList getList()
                 throws ExtensionException,
                        LogoException
Argumentorg.nlogo.api.LogoList
getList in interface ArgumentExtensionException - if the argument is not a LogoList
LogoException - if a LogoException occurred while evaluating this argument
public Patch getPatch()
               throws ExtensionException,
                      LogoException
Argumentorg.nlogo.api.Patch
getPatch in interface ArgumentExtensionException - if the argument is not a Patch
LogoException - if a LogoException occurred while evaluating this argument
public String getString()
                 throws ExtensionException,
                        LogoException
ArgumentString
getString in interface ArgumentExtensionException - if the argument cannot be cast to a String
LogoException - if a LogoException occurred while evaluating this argument
public Turtle getTurtle()
                 throws ExtensionException,
                        LogoException
Argumentorg.nlogo.api.Turtle.
getTurtle in interface ArgumentExtensionException - if the argument is not a Turtle
LogoException - if a LogoException occurred while evaluating this argumentpublic Reporter getReporter()