uk.ac.leeds.ccg.andyt.grids.core
Class AbstractGrid2DSquareCellChunk.ChunkCellID

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

public class AbstractGrid2DSquareCellChunk.ChunkCellID
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

A simple ChunkCellID class for distinguishing cells in this chunk.

See Also:
Serialized Form

Field Summary
protected  int chunkCellColIndex
          For storing the column in which the cell is positioned
protected  int chunkCellRowIndex
          For storing the row in which the cell is positioned
 
Constructor Summary
protected AbstractGrid2DSquareCellChunk.ChunkCellID()
          Constructs a new ChunkCellID
protected AbstractGrid2DSquareCellChunk.ChunkCellID(int chunkCellRowIndex, int chunkCellColIndex)
          Constructs a new ChunkCellID
protected AbstractGrid2DSquareCellChunk.ChunkCellID(int _ChunkNCols, int chunkCellRowIndex, int chunkCellColIndex)
          Constructs a new ChunkCellID
 
Method Summary
 int compareTo(java.lang.Object object)
          Method required by Comparable
 boolean equals(java.lang.Object object)
          Overrides equals in Object
 long getChunkCellColIndex()
          Returns chunkCellColIndex of this CellID
 long getChunkCellRowIndex()
          Returns chunkCellRowIndex of this CellID
 int hashCode()
           
 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

chunkCellRowIndex

protected int chunkCellRowIndex
For storing the row in which the cell is positioned


chunkCellColIndex

protected int chunkCellColIndex
For storing the column in which the cell is positioned

Constructor Detail

AbstractGrid2DSquareCellChunk.ChunkCellID

protected AbstractGrid2DSquareCellChunk.ChunkCellID()
Constructs a new ChunkCellID


AbstractGrid2DSquareCellChunk.ChunkCellID

protected AbstractGrid2DSquareCellChunk.ChunkCellID(int chunkCellRowIndex,
                                                    int chunkCellColIndex)
Constructs a new ChunkCellID

Parameters:
chunkCellRowIndex - the row of the cell
chunkCellColIndex - the column of the cell

AbstractGrid2DSquareCellChunk.ChunkCellID

protected AbstractGrid2DSquareCellChunk.ChunkCellID(int _ChunkNCols,
                                                    int chunkCellRowIndex,
                                                    int chunkCellColIndex)
Constructs a new ChunkCellID

Parameters:
chunkCellRowIndex - the row of the cell
chunkCellColIndex - the column of the cell
_ChunkNCols - the number of columns in the chunk
Method Detail

getChunkCellRowIndex

public long getChunkCellRowIndex()
Returns chunkCellRowIndex of this CellID


getChunkCellColIndex

public long getChunkCellColIndex()
Returns chunkCellColIndex of this CellID


toString

public java.lang.String toString()
Returns a description of this CellID

Overrides:
toString in class java.lang.Object

equals

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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode 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