|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.util.RowManager
public class RowManager
Manages the set of valid rows for a Table instance, maintains an index of the available and occupied rows. RowManager instances are used internally by Table instances.
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
protected Table |
m_table
|
| Constructor Summary | |
|---|---|
RowManager(Table table)
Create a new RowManager for the given Table. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Table m_table
| Constructor Detail |
|---|
public RowManager(Table table)
table - the Table to manage| Method Detail |
|---|
public Table getTable()
public int getMinimumRow()
public int getMaximumRow()
public int getRowCount()
public boolean isValidRow(int row)
row - the row index to check
public void clear()
public int addRow()
public boolean releaseRow(int row)
row - the row index of the released row
public int getColumnRow(int row,
int col)
row - the table rowcol - the table column
public int getTableRow(int columnRow,
int col)
columnRow - the row of the underlying data columncol - the table column
public IntIterator columnRows(int col)
col - the table column index
public IntIterator columnRows(int col,
boolean reverse)
col - the table column indexreverse - indicates the direction to iterate over, true
for reverse, false for normal
public IntIterator columnRows(IntIterator rows,
int col)
rows - an iterator over table row indicescol - the table column index
public IntIterator rows()
public IntIterator rows(boolean reverse)
reverse - indicates the direction to iterate over, true
for reverse, false for normal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||