public class DefaultTupleSet extends AbstractTupleSet implements EventConstants
TupleSet implementation that maintains a set of heterogeneous Tuples
-- tuples that can come from any backing data source. This class supports
addTuple(Tuple) and removeTuple(Tuple) but does not
support adding new columns to contained tuples.
This TupleSet uses a LinkedHashSet to support fast
lookup of contained tuples while maintaining Tuples in the order in which
they are added to the set.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.LinkedHashSet |
m_tuples |
ALL_COLUMNS, DELETE, INSERT, UPDATEEMPTY_ARRAY| Constructor and Description |
|---|
DefaultTupleSet()
Create a new, empty DefaultTupleSet.
|
| Modifier and Type | Method and Description |
|---|---|
protected Tuple |
addInternal(Tuple t)
Adds a tuple without firing a notification.
|
Tuple |
addTuple(Tuple t)
Add a Tuple to this TupleSet.
|
void |
clear()
Clear this TupleSet, removing all contained Tuples.
|
Tuple[] |
clearInternal()
Clear the internal state without firing a notification.
|
boolean |
containsTuple(Tuple t)
Indicates if a given Tuple is contained within this TupleSet.
|
int |
getTupleCount()
Get the number of tuples in this set.
|
protected boolean |
removeInternal(Tuple t)
Removes a tuple without firing a notification.
|
boolean |
removeTuple(Tuple t)
Remove a Tuple from this TupleSet.
|
Tuple |
setTuple(Tuple t)
Set the TupleSet contents to be a single Tuple.
|
Tuple[] |
toArray()
Get the contents of this TupleSet as an array.
|
java.util.Iterator |
tuples()
Return an iterator over the tuples in this tuple set.
|
addColumn, addColumn, addColumn, addColumn, addColumns, addPropertyChangeListener, addPropertyChangeListener, addTupleSetListener, fireTupleEvent, fireTupleEvent, fireTupleEvent, getClientProperty, isAddColumnSupported, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTupleSetListener, tuples, tuplespublic int getTupleCount()
TupleSetgetTupleCount in interface TupleSetTupleSet.getTupleCount()public Tuple addTuple(Tuple t)
TupleSetaddTuple in interface TupleSett - the Tuple addTupleSet.addTuple(prefuse.data.Tuple)public Tuple setTuple(Tuple t)
TupleSetsetTuple in interface TupleSett - the Tuple to set as the content of this TupleSetTupleSet.setTuple(prefuse.data.Tuple)protected final Tuple addInternal(Tuple t)
t - the Tuple to addpublic boolean containsTuple(Tuple t)
TupleSetcontainsTuple in interface TupleSett - the tuple to check for containmentTupleSet.containsTuple(prefuse.data.Tuple)public boolean removeTuple(Tuple t)
TupleSetremoveTuple in interface TupleSett - the Tuple to removeTupleSet.removeTuple(prefuse.data.Tuple)protected final boolean removeInternal(Tuple t)
t - the tuple to removepublic void clear()
TupleSetclear in interface TupleSetTupleSet.clear()public Tuple[] clearInternal()
public java.util.Iterator tuples()
TupleSettuples in interface TupleSetTupleSet.tuples()public Tuple[] toArray()