Class WorldObject
- java.lang.Object
-
- jadex.bdi.examples.hunterprey_classic.WorldObject
-
-
Constructor Summary
Constructors Constructor Description WorldObject()Create a new WorldObject.WorldObject(Location location)Create a new WorldObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Test if two worldobjects are equal.LocationgetLocation()Get the location of this WorldObject.inthashCode()Get the hash code of the world object.voidsetLocation(Location location)Set the location of this WorldObject.java.lang.StringtoString()Get a string representation of this WorldObject.
-
-
-
Field Detail
-
location
protected Location location
The location of the object.
-
-
Constructor Detail
-
WorldObject
public WorldObject()
Create a new WorldObject.
-
WorldObject
public WorldObject(Location location)
Create a new WorldObject.
-
-
Method Detail
-
getLocation
public Location getLocation()
Get the location of this WorldObject. The location of the object.- Returns:
- location
-
setLocation
public void setLocation(Location location)
Set the location of this WorldObject. The location of the object.- Parameters:
location- the value to be set
-
toString
public java.lang.String toString()
Get a string representation of this WorldObject.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
equals
public boolean equals(java.lang.Object o)
Test if two worldobjects are equal.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Get the hash code of the world object.- Overrides:
hashCodein classjava.lang.Object
-
-