Package jadex.bdiv3.examples.puzzle
Class Position
- java.lang.Object
-
- jadex.bdiv3.examples.puzzle.Position
-
- All Implemented Interfaces:
java.io.Serializable
public class Position extends java.lang.Object implements java.io.SerializableA position has two coordinates.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Test if two positions are equal.intgetX()Get the x value.intgetY()Get the y value.inthashCode()Calculate the hash code.voidsetX(int x)Set x.voidsetY(int y)Set y.java.lang.StringtoString()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:
equalsin classjava.lang.Object- Returns:
- True, if equal.
-
hashCode
public int hashCode()
Calculate the hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
-