public class RowManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
RowManager.ColumnRowIterator
Iterator over the indices into a given data column,
mapped to from the rows of this RowManager.
|
class |
RowManager.RowIterator
Iterator over the occupied rows of this RowManager.
|
Constructor and Description |
---|
RowManager(Table table)
Create a new RowManager for the given Table.
|
Modifier and Type | Method and Description |
---|---|
int |
addRow()
Add a new row to management.
|
void |
clear()
Clear the row manager status, marking all rows as available.
|
IntIterator |
columnRows(int col)
Return an iterator over column row indices.
|
IntIterator |
columnRows(int col,
boolean reverse)
Return an iterator over column row indices.
|
IntIterator |
columnRows(IntIterator rows,
int col)
Return an iterator over column row indices.
|
int |
getColumnRow(int row,
int col)
Given Table row and column indices, return the corresponding row in
the underlying data column.
|
int |
getMaximumRow()
Get the highest-numbered occupied table row.
|
int |
getMinimumRow()
Get the lowest-numbered occupied table row.
|
int |
getRowCount()
Get the total number of occupied rows
|
Table |
getTable()
Get the table managed by this RowManager.
|
int |
getTableRow(int columnRow,
int col)
Given a column row index and a table column index, return the
table row corresponding to the column value.
|
boolean |
isValidRow(int row)
Indicates if a given row value is a valid, occupied row of the table.
|
boolean |
releaseRow(int row)
Release a row and mark it as free.
|
IntIterator |
rows()
Get an iterator over the table rows.
|
IntIterator |
rows(boolean reverse)
Get an iterator over the table rows.
|
protected Table m_table
public RowManager(Table table)
table
- the Table to managepublic Table getTable()
public int getMinimumRow()
public int getMaximumRow()
public int getRowCount()
public boolean isValidRow(int row)
row
- the row index to checkpublic void clear()
public int addRow()
public boolean releaseRow(int row)
row
- the row index of the released rowpublic int getColumnRow(int row, int col)
row
- the table rowcol
- the table columnpublic int getTableRow(int columnRow, int col)
columnRow
- the row of the underlying data columncol
- the table columnpublic IntIterator columnRows(int col)
col
- the table column indexpublic IntIterator columnRows(int col, boolean reverse)
col
- the table column indexreverse
- indicates the direction to iterate over, true
for reverse, false for normalpublic IntIterator columnRows(IntIterator rows, int col)
rows
- an iterator over table row indicescol
- the table column indexpublic IntIterator rows()
public IntIterator rows(boolean reverse)
reverse
- indicates the direction to iterate over, true
for reverse, false for normalCopyright ? 2013 Regents of the University of California