Class Location
- java.lang.Object
-
- jadex.bdi.examples.hunterprey_classic.Location
-
public class Location extends java.lang.Object
Editable Java class for concept Location of hunterprey ontology.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Test if two locations are equal.int
getX()
Get the x of this Location.int
getY()
Get the y of this Location.int
hashCode()
The hashcode is the 16 bit shifted x position plus the y position.void
setX(int x)
Set the x of this Location.void
setY(int y)
Set the y of this Location.
-
-
-
Method Detail
-
getX
public int getX()
Get the x of this Location. The x-coordinate.- Returns:
- x
-
setX
public void setX(int x)
Set the x of this Location. The x-coordinate.- Parameters:
x
- the value to be set
-
getY
public int getY()
Get the y of this Location. The y-coordinate.- Returns:
- y
-
setY
public void setY(int y)
Set the y of this Location. The y-coordinate.- Parameters:
y
- the value to be set
-
equals
public boolean equals(java.lang.Object o)
Test if two locations are equal.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
The hashcode is the 16 bit shifted x position plus the y position.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hashcode.
-
-