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 boolean
equals(java.lang.Object o)
Test if two worldobjects are equal.Location
getLocation()
Get the location of this WorldObject.int
hashCode()
Get the hash code of the world object.void
setLocation(Location location)
Set the location of this WorldObject.java.lang.String
toString()
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:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
equals
public boolean equals(java.lang.Object o)
Test if two worldobjects are equal.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Get the hash code of the world object.- Overrides:
hashCode
in classjava.lang.Object
-
-