| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--jeops.examples.monkeys.PhysicalObject
        |
        +--jeops.examples.monkeys.Monkey
An agent in the monkey and bananas world.
| Field Summary | |
| private  PhysicalObject | objectHeldThe object this monkey holds. | 
| Fields inherited from class jeops.examples.monkeys.PhysicalObject | 
| at,  
description,  
on,  
weight | 
| Constructor Summary | |
| Monkey()Class constructor. | |
| Monkey(java.awt.Point at)Class constructor. | |
| Monkey(java.lang.String name,
       java.awt.Point at)Class constructor. | |
| Method Summary | |
|  void | bring(PhysicalObject obj,
      java.awt.Point position)Brings an object to somewhere. | 
|  void | climbOn(PhysicalObject obj)Climbs on some object. | 
|  void | drop()Drops the object this monkey is holding. | 
|  PhysicalObject | getObjectHeld()Returns the object this monkey holds. | 
|  void | goTo(java.awt.Point position)Go somewhere. | 
|  boolean | holdsNothing()Checks whether this monkey holds something. | 
|  boolean | holdsSomething()Checks whether this monkey holds something. | 
|  boolean | isHolding(PhysicalObject obj)Checks whether this monkey holds a given object. | 
|  void | jumpOn(PhysicalObject obj)Jumps on some object. | 
|  void | setObjectHeld(PhysicalObject value)Defines the object this monkey holds. | 
|  void | take(PhysicalObject obj)Takes an object. | 
| Methods inherited from class jeops.examples.monkeys.PhysicalObject | 
| getAt, 
getDescription, 
getOn, 
getWeight, 
isAt, 
isOn, 
setAt, 
setOn, 
toString | 
| Methods inherited from class java.lang.Object | 
|  | 
| Field Detail | 
private PhysicalObject objectHeld
| Constructor Detail | 
public Monkey()
public Monkey(java.awt.Point at)
at - the position of this object
public Monkey(java.lang.String name,
              java.awt.Point at)
name - the name of this monkeyat - the position of this object| Method Detail | 
public void bring(PhysicalObject obj,
                  java.awt.Point position)
obj - the object to be brought.position - the new position of this monkey and the
          given object.public void climbOn(PhysicalObject obj)
obj - the object this monkey is climbing on.public void drop()
public PhysicalObject getObjectHeld()
public void goTo(java.awt.Point position)
position - the new position of this monkey.public boolean holdsNothing()
true if this monkey holds nothing;
          false otherwise.public boolean holdsSomething()
true if this monkey holds something;
          false otherwise.public boolean isHolding(PhysicalObject obj)
obj - the object to be checked.true if this monkey holds the given object;
          false otherwise.public void jumpOn(PhysicalObject obj)
obj - the object this monkey is jumping on.public void setObjectHeld(PhysicalObject value)
value - the object this monkey holds.public void take(PhysicalObject obj)
obj - the object this monkey is taking.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||