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

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

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

A simple ChunkID class for distinguishing chunks.

See Also:
Serialized Form

Field Summary
protected  int _ChunkColIndex
          For storing the chunk column index
protected  int _ChunkRowIndex
          For storing the chunk row index
 
Constructor Summary
AbstractGrid2DSquareCell.ChunkID()
          Default constructor.
AbstractGrid2DSquareCell.ChunkID(AbstractGrid2DSquareCell.ChunkID _ChunkID)
          Constructs a new ChunkID that is a clone of _ChunkID
AbstractGrid2DSquareCell.ChunkID(int _NChunkCols, int _ChunkRowIndex, int _ChunkColIndex)
          Constructs a new ChunkID
 
Method Summary
 int compareTo(java.lang.Object object)
          Method required by Comparable
 boolean equals(java.lang.Object object)
          Overrides equals in Object
 int getChunkColIndex()
           
 int getChunkRowIndex()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_ChunkRowIndex

protected int _ChunkRowIndex
For storing the chunk row index


_ChunkColIndex

protected int _ChunkColIndex
For storing the chunk column index

Constructor Detail

AbstractGrid2DSquareCell.ChunkID

public AbstractGrid2DSquareCell.ChunkID()
Default constructor.


AbstractGrid2DSquareCell.ChunkID

public AbstractGrid2DSquareCell.ChunkID(AbstractGrid2DSquareCell.ChunkID _ChunkID)
Constructs a new ChunkID that is a clone of _ChunkID

Parameters:
a_ChunkID - The ChunkID to clone.

AbstractGrid2DSquareCell.ChunkID

public AbstractGrid2DSquareCell.ChunkID(int _NChunkCols,
                                        int _ChunkRowIndex,
                                        int _ChunkColIndex)
Constructs a new ChunkID

Parameters:
a_ChunkRowIndex - the row of the
a_ChunkColIndex - the column of the
nChunkCols - The number of chunk columns (of the grid2DSquareCellAbstract).
Method Detail

getChunkRowIndex

public int getChunkRowIndex()
Returns:
this._ChunkRowIndex

getChunkColIndex

public int getChunkColIndex()
Returns:
this._ChunkColIndex

toString

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

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