uk.ac.leeds.ccg.andyt.grids.core
Class AbstractGrid2DSquareCell.CellID

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell.CellID
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Enclosing class:
AbstractGrid2DSquareCell

public static class AbstractGrid2DSquareCell.CellID
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

A simple CellID class for distinguishing cells.

See Also:
Serialized Form

Field Summary
protected  long _CellColIndex
          For storing the column in which the cell is positioned
protected  long _CellRowIndex
          For storing the row in which the cell is positioned
 
Constructor Summary
AbstractGrid2DSquareCell.CellID()
          Default constructor.
AbstractGrid2DSquareCell.CellID(AbstractGrid2DSquareCell.CellID _CellID)
          Constructs a new CellID that is a clone of _CellID
AbstractGrid2DSquareCell.CellID(long _NCols, long _CellRowIndex, long _CellColIndex)
          Constructs a new CellID.
 
Method Summary
 int compareTo(java.lang.Object object)
          Method required by Comparable
 boolean equals(java.lang.Object object)
          Overrides equals in Object
 long getCellColIndex()
           
 long getCellRowIndex()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_CellRowIndex

protected long _CellRowIndex
For storing the row in which the cell is positioned


_CellColIndex

protected long _CellColIndex
For storing the column in which the cell is positioned

Constructor Detail

AbstractGrid2DSquareCell.CellID

public AbstractGrid2DSquareCell.CellID()
Default constructor.


AbstractGrid2DSquareCell.CellID

public AbstractGrid2DSquareCell.CellID(AbstractGrid2DSquareCell.CellID _CellID)
Constructs a new CellID that is a clone of _CellID

Parameters:
a_CellID - The CellID to clone.

AbstractGrid2DSquareCell.CellID

public AbstractGrid2DSquareCell.CellID(long _NCols,
                                       long _CellRowIndex,
                                       long _CellColIndex)
Constructs a new CellID.

Parameters:
cellRowIndex - The row of the cell.
cellColIndex - The column of the cell.
_NCols - The number of columns in a grid2DSquareCellAbstract.
Method Detail

getCellRowIndex

public long getCellRowIndex()
Returns:
_CellRowIndex of this CellID

getCellColIndex

public long getCellColIndex()
Returns:
_CellColIndex of this CellID

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a description of this CellID

hashCode

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

equals

public boolean equals(java.lang.Object object)
Overrides equals in Object

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object object)
Method required by Comparable

Specified by:
compareTo in interface java.lang.Comparable