jrummikub.model
Class Position
java.lang.Object
jrummikub.model.Position
- All Implemented Interfaces:
- java.io.Serializable
public class Position
- extends java.lang.Object
- implements java.io.Serializable
Stone
Position class to determine positions on Table
or
Hand
- See Also:
- Serialized Form
Constructor Summary |
Position(double x,
double y)
Create a new position by specifying the coordinates |
Method Summary |
boolean |
equals(java.lang.Object obj)
|
double |
getX()
Get the x coordinate of the position |
double |
getY()
Get the y coordinate of the position |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
x
private double x
y
private double y
Position
public Position(double x,
double y)
- Create a new position by specifying the coordinates
- Parameters:
x
- x coordinatey
- y coordinate
getX
public double getX()
- Get the x coordinate of the position
- Returns:
- x coordinate
getY
public double getY()
- Get the y coordinate of the position
- Returns:
- y coordinate
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object