edu.neu.ccs.gui
Class CellPosition

java.lang.Object
  extended byedu.neu.ccs.gui.CellPosition

public class CellPosition
extends Object

Encapsulates a row-column pair referencing an index in a 2-dimensional array.

Since:
1.1
Version:
2.2

Field Summary
 int col
          The column, or second, index into a 2-dimensional array.
 int row
          The row, or first, index into a 2-dimensional array.
 
Constructor Summary
CellPosition()
          Constructs a cell position representing the index at row 0 and column 0.
CellPosition(int r, int c)
          Constructs a cell position representing the index at the given row and column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

row

public int row
The row, or first, index into a 2-dimensional array.


col

public int col
The column, or second, index into a 2-dimensional array.

Constructor Detail

CellPosition

public CellPosition()
Constructs a cell position representing the index at row 0 and column 0.

See Also:
CellPosition(int, int)

CellPosition

public CellPosition(int r,
                    int c)
Constructs a cell position representing the index at the given row and column.

Parameters:
r - the row for this cell position
c - the column for this cell position
See Also:
CellPosition()