Class Location

java.lang.Object
  |
  +--Location

public final class Location
extends java.lang.Object

Simple class to define an i, j position on a Grid.

See Also:
Grid

Constructor Summary
Location(int i, int j)
          Construct a new Location with the i, j position.
 
Method Summary
 int getI()
          Returns the i of this.
 int getJ()
          Returns the j of this.
 void setI(int i)
          Sets the i of this.
 void setJ(int j)
          Returns the j of this.
 void setLocation(int i, int j)
          Set the i, j of this.
 void setLocation(Location l)
          Copies the i, j into this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Location

public Location(int i,
                int j)
Construct a new Location with the i, j position.

Parameters:
i - the row
j - the column
Method Detail

getI

public int getI()
Returns the i of this.

Returns:
the i of this, ie the row

getJ

public int getJ()
Returns the j of this.

Returns:
the j of this, ie the column

setI

public void setI(int i)
Sets the i of this.


setJ

public void setJ(int j)
Returns the j of this.


setLocation

public void setLocation(int i,
                        int j)
Set the i, j of this.

Parameters:
i - the new i of this, ie the new Row
j - the new j of this, ie the column

setLocation

public void setLocation(Location l)
Copies the i, j into this.

Parameters:
l - the Location to copy the i, j from, ie the Row, Column.