Class brsVisitor.BRSDisplayAdapter$RowColIdx
- class BRSDisplayAdapter$RowColIdx
- extends Object
This class is a "carrier" class that holds the row and column index for a node in a BiTree. The rows are numbered from 0 at the first row.
The columns are numbered from 0 from the left. This class is also a factory for the RowColIdx needed for the left and right sub-trees
of the present node. This is a private inner class of BRSDisplayAdapter.
- colIdx
- The stored column index
- rowIdx
- RowColIdx
(int, int)
- Constructor for the class
- getColIdx
()
- Accessor method for the row index
- getRowIdx
()
- Accessor method for the row index
- nextLeft
()
- Factory method for the RowColIdx instance needed for the left sub-tree
- nextRight
()
- Factory method for the RowColIdx instance needed for the left sub-tree
colIdx
int colIdx
- The stored column index.
rowIdx
int rowIdx
RowColIdx
public RowColIdx(int rowIdx, int colIdx)
- Constructor for the class.
- Parameters:
- rowIdx - The row index
- colIdx - The column index
getRowIdx
int getRowIdx()
- Accessor method for the row index.
- Returns:
getColIdx
int getColIdx()
- Accessor method for the row index.
- Returns:
nextLeft
RowColIdx nextLeft()
- Factory method for the RowColIdx instance needed for the left sub-tree. The new (row, col) indices are (row+1, 2*col)
- Returns:
- A new RowColIdx instance
nextRight
RowColIdx nextRight()
- Factory method for the RowColIdx instance needed for the left sub-tree. The new (row, col) indices are (row+1, 2*col+1)
- Returns:
- A new RowColIdx instance