|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jeops.examples.monkeys.Goal
A goal of the agent in the monkey and bananas world.
| Field Summary | |
private PhysicalObject |
object
The object associated with this goal. |
private int |
status
The status of this goal. |
private java.awt.Point |
to
The destiny of this goal (if it's the case) |
private int |
type
The type of this goal (HOLD, AT, ON) |
| Fields inherited from interface jeops.examples.monkeys.Constants |
ACTIVE,
AT,
CEILING,
FLOOR,
HEAVY,
HOLD,
LIGHT,
ON,
SATISFIED |
| Constructor Summary | |
Goal(int type)
Class constructor. |
|
| Method Summary | |
PhysicalObject |
getObject()
Returns the object associated with this goal. |
java.awt.Point |
getTo()
Returns the destiny of this goal (if applicable) |
int |
getType()
Returns the type of this goal, which can be one of (HOLD, AT, ON). |
boolean |
isActive()
Checks whether this goal is active. |
boolean |
isSatisfied()
Checks whether this goal is satisfied. |
void |
setObject(PhysicalObject newObject)
Sets the object associated with this goal. |
void |
setSatisfied()
Defines that this goal has been accomplished. |
void |
setTo(java.awt.Point newTo)
Sets the destiny of this goal (if applicable). |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private PhysicalObject object
private int status
private int type
private java.awt.Point to
| Constructor Detail |
public Goal(int type)
type - the type of this goal.| Method Detail |
public PhysicalObject getObject()
public java.awt.Point getTo()
public int getType()
public boolean isActive()
true if this goal is active;
false otherwise.public boolean isSatisfied()
true if this goal is satisfied;
false otherwise.public void setObject(PhysicalObject newObject)
newObject - the object associated with this goal.public void setSatisfied()
public void setTo(java.awt.Point newTo)
newTo - the new destiny of this goal.public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||