|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.data.tuple.TupleManager
public class TupleManager
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.
Nested Class Summary | |
---|---|
class |
TupleManager.TupleManagerIterator
Iterator instance for iterating over tuples managed in a TupleManager. |
Field Summary | |
---|---|
protected Graph |
m_graph
|
protected Table |
m_table
|
protected java.lang.Class |
m_tupleType
|
Constructor Summary | |
---|---|
TupleManager(Table t,
Graph g,
java.lang.Class tupleType)
Create a new TupleManager for the given Table. |
Method Summary | |
---|---|
Tuple |
getTuple(int row)
Get a Tuple corresponding to the given row index. |
java.lang.Class |
getTupleType()
Get the type of Tuple instances to generate. |
void |
init(Table t,
Graph g,
java.lang.Class tupleType)
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.util.Iterator |
iterator(IntIterator rows)
Return an iterator over the tuples in this manager. |
protected TableTuple |
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 m_graph
protected Table m_table
protected java.lang.Class m_tupleType
Constructor Detail |
---|
public TupleManager(Table t, Graph g, java.lang.Class tupleType)
t
- the data Table to generate Tuples forMethod Detail |
---|
public void init(Table t, Graph g, java.lang.Class tupleType)
t
- the data Table to generate Tuples forpublic java.lang.Class getTupleType()
public Tuple getTuple(int row)
row
- the row index
protected TableTuple 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.util.Iterator iterator(IntIterator rows)
rows
- an iterator over table rows
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |