|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectturtlekit.kernel.Patch
public final class Patch
The Patch class
Constructor Summary | |
---|---|
Patch(TurtleEnvironment w)
|
Method Summary | |
---|---|
void |
dropMark(java.lang.String markName,
java.lang.Object value)
Drop a mark on the patch |
java.awt.Color |
getColor()
|
java.lang.Object |
getMark(java.lang.String markName)
get a mark deposed on the patch |
Patch[] |
getNeighbors()
|
Turtle[] |
getTurtles()
returns the turtles who are on the patch |
double |
getVariableValue(java.lang.String VariableName)
return the value of the corresponding variable |
void |
incrementPatchVariable(java.lang.String VariableName,
double n)
add n to the value of the corresponding patch variable |
boolean |
isMarkPresent(java.lang.String markName)
tests if the corresponding mark is present on the patch (true or false) |
void |
setColor(java.awt.Color c)
|
void |
setPatchVariable(java.lang.String VariableName,
double n)
set the value of the corresponding patch variable to n, use it with observers in the setup method for example |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Patch(TurtleEnvironment w)
Method Detail |
---|
public final void setPatchVariable(java.lang.String VariableName, double n)
public final void incrementPatchVariable(java.lang.String VariableName, double n)
public final double getVariableValue(java.lang.String VariableName)
public final java.awt.Color getColor()
public final void setColor(java.awt.Color c)
public final void dropMark(java.lang.String markName, java.lang.Object value)
markName:
- mark namevalue:
- mark itself, can be any java objectpublic final java.lang.Object getMark(java.lang.String markName)
public final boolean isMarkPresent(java.lang.String markName)
public final Turtle[] getTurtles()
public final Patch[] getNeighbors()
public final java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |