lab1
Class Position

java.lang.Object
  extended by lab1.Position

public class Position
extends java.lang.Object

Immutable class describing integer 2D-points.

Author:
evensen

Constructor Summary
Position(int x, int y)
          Creates an immutable instance of a 2D integer coordinate.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getX()
           
 int getY()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Position

public Position(int x,
                int y)
Creates an immutable instance of a 2D integer coordinate.

Method Detail

getX

public int getX()
Returns:
The x value of the coordinate.

getY

public int getY()
Returns:
The x value of the coordinate.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object