public interface Agent
Interface provides access to NetLogo agents. NetLogo agents include turtles, patches, links and the observer.
Method Summary | |
---|---|
String |
classDisplayName()
Returns a displayable name of this type of agent (Turtle, Link, Patch, Observer) |
Object |
getVariable(int vn)
Returns the value of the variable in the given position of the agent variable array |
long |
id()
Returns the id number of this agent. |
void |
setVariable(int vn,
Object value)
Sets the variable in the position vn of the agent variable array to value |
String |
shape()
Returns the name of the current shape, empty string in the case of patches. |
double |
size()
Returns the size of this agent |
World |
world()
Returns the world object associated with this agent |
Method Detail |
---|
String classDisplayName()
World world()
long id()
String shape()
double size()
void setVariable(int vn, Object value) throws LogoException, AgentException
vn
- the index into the agent variable arrayvalue
- the new value for the variable
LogoException
AgentException
- If value is the wrong type for the given variable or if you try to change variables that cannot be changedObject getVariable(int vn)
vn
- the index into the agent variable array