|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprefuse.data.tuple.TupleManager<T>
public abstract class TupleManager<T extends Tuple<?>>
Manager class for Tuples. There is a unique Tuple for each row of a table. All data structures and Tuples are created lazily, on an as-needed basis. When a row is deleted from the table, it's corresponding Tuple (if created) is invalidated before being removed from this data structure, ensuring that any other live references to the Tuple can't be used to corrupt the table.
Field Summary | |
---|---|
protected Graph<T,?,?> |
m_graph
|
protected Table<T> |
m_table
|
Constructor Summary | |
---|---|
TupleManager(Table<T> t,
Graph<?,?,?> g)
Create a new TupleManager for the given Table. |
Method Summary | |
---|---|
abstract T |
createTupleInstance()
|
T |
getTuple(int row)
Get a Tuple corresponding to the given row index. |
void |
init(Table<?> t,
Graph<?,?,?> g)
Initialize this TupleManager for use with a given Table. |
void |
invalidate(int row)
Invalidate the tuple at the given row. |
void |
invalidateAll()
Invalidate all tuples managed by this TupleManager |
java.lang.Iterable<T> |
iterable(IntIterator rows)
Return an iterator over the tuples in this manager. |
java.util.List<T> |
list(java.util.List<java.lang.Integer> rows)
|
protected T |
newTuple(int row)
Instantiate a new Tuple instance for the given row index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Graph<T extends Tuple<?>,?,?> m_graph
protected Table<T extends Tuple<?>> m_table
Constructor Detail |
---|
public TupleManager(Table<T> t, Graph<?,?,?> g)
t
- the data Table to generate Tuples forMethod Detail |
---|
public abstract T createTupleInstance()
public void init(Table<?> t, Graph<?,?,?> g)
t
- the data Table to generate Tuples forpublic T getTuple(int row)
row
- the row index
protected T newTuple(int row)
row
- the row index of the tuple
public void invalidate(int row)
row
- the row index to invalidatepublic void invalidateAll()
public java.lang.Iterable<T> iterable(IntIterator rows)
rows
- an iterator over table rows
public java.util.List<T> list(java.util.List<java.lang.Integer> rows)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |