Package jadex.bdi.examples.puzzle
Class Position
- java.lang.Object
-
- jadex.bdi.examples.puzzle.Position
-
- All Implemented Interfaces:
java.io.Serializable
public class Position extends java.lang.Object implements java.io.Serializable
A position has two coordinates.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Test if two positions are equal.int
getX()
Get the x value.int
getY()
Get the y value.int
hashCode()
Calculate the hash code.void
setX(int x)
Set x.void
setY(int y)
Set y.java.lang.String
toString()
Get the string representation.
-
-
-
Method Detail
-
getX
public int getX()
Get the x value.
-
getY
public int getY()
Get the y value.
-
setX
public void setX(int x)
Set x.- Parameters:
x
-
-
setY
public void setY(int y)
Set y.- Parameters:
y
-
-
equals
public boolean equals(java.lang.Object o)
Test if two positions are equal.- Overrides:
equals
in classjava.lang.Object
- Returns:
- True, if equal.
-
hashCode
public int hashCode()
Calculate the hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-