ou3
Class Position

java.lang.Object
  extended by ou3.Position

public class Position
extends java.lang.Object

Contains a two-dimensional position.

Author:
tm11ajn

Field Summary
private  int x
          Represents the horizontal positioning.
private  int y
          Represents the vertical positioning.
 
Constructor Summary
Position(int x, int y)
          Constructs a position
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getX()
          Returns x coordinate of position
 int getY()
          Returns y coordinate of position
 int hashCode()
           
 java.lang.String toString()
          ToString-method, returns the x and y coordinates in the form (x, y)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

private int x
Represents the horizontal positioning.


y

private int y
Represents the vertical positioning.

Constructor Detail

Position

public Position(int x,
                int y)
Constructs a position

Parameters:
x - - x coordinate
y - - y coordinate
Method Detail

getX

public int getX()
Returns x coordinate of position

Returns:
x coordinate

getY

public int getY()
Returns y coordinate of position

Returns:
y coordinate

equals

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

hashCode

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

toString

public java.lang.String toString()
ToString-method, returns the x and y coordinates in the form (x, y)

Overrides:
toString in class java.lang.Object