|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellAbstract.CellID
public static class Grid2DSquareCellAbstract.CellID
A simple CellID class for distinguishing cells.
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 |
protected int |
hashCode
For storing a hashCode for the cell. |
Constructor Summary | |
---|---|
Grid2DSquareCellAbstract.CellID()
Default constructor. |
|
Grid2DSquareCellAbstract.CellID(Grid2DSquareCellAbstract.CellID cellID)
Constructs a new CellID that is a clone of cellID |
|
Grid2DSquareCellAbstract.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()
Returns cellColIndex of this CellID |
long |
getCellRowIndex()
Returns cellRowIndex of this CellID |
int |
hashCode()
Returns hashCode of this CellID |
java.lang.String |
toString()
Returns a description of this CellID |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected long cellRowIndex
protected long cellColIndex
protected int hashCode
Constructor Detail |
---|
public Grid2DSquareCellAbstract.CellID()
public Grid2DSquareCellAbstract.CellID(Grid2DSquareCellAbstract.CellID cellID)
cellID
- The CellID to clone.public Grid2DSquareCellAbstract.CellID(long ncols, long cellRowIndex, long cellColIndex)
cellRowIndex
- The row of the cell.cellColIndex
- The column of the cell.ncols
- The number of columns in a grid2DSquareCellAbstract.Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public long getCellRowIndex()
public long getCellColIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |