|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectObservation
public final class Observation
Returned by Creature.look
Field Summary | |
---|---|
java.lang.String |
className
If type == CREATURE, this is the classname of that creature. |
Direction |
direction
If type == CREATURE, this is the direction that creature is facing. |
int |
id
If type == CREATURE, this is the ID of that creature. |
java.awt.Point |
position
Point that was observed. |
int |
time
Value returned from Creature.getTime() when this observation was made. |
Type |
type
Type of object at this location. |
Constructor Summary | |
---|---|
Observation(int x,
int y,
int t)
|
|
Observation(java.awt.Point p,
int t)
|
|
Observation(java.awt.Point p,
java.lang.String c,
int i,
Direction dir,
int tm)
|
|
Observation(java.awt.Point p,
Type t,
int tm)
Cannot be used to make a creature observation. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Type type
public java.lang.String className
public int id
public Direction direction
public java.awt.Point position
public int time
Constructor Detail |
---|
public Observation(int x, int y, int t)
public Observation(java.awt.Point p, int t)
public Observation(java.awt.Point p, Type t, int tm)
tm
- Time of observationpublic Observation(java.awt.Point p, java.lang.String c, int i, Direction dir, int tm)
tm
- Time of observationMethod Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |