|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.tuple.AbstractTupleSet
prefuse.data.tuple.DefaultTupleSet
public class DefaultTupleSet
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 mainting Tuples in the order in which
they are added to the set.
| Field Summary | |
|---|---|
protected java.util.LinkedHashSet |
m_tuples
|
| Fields inherited from interface prefuse.data.event.EventConstants |
|---|
ALL_COLUMNS, DELETE, INSERT, UPDATE |
| Fields inherited from interface prefuse.data.tuple.TupleSet |
|---|
EMPTY_ARRAY |
| Constructor Summary | |
|---|---|
DefaultTupleSet()
Create a new, empty DefaultTupleSet. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class prefuse.data.tuple.AbstractTupleSet |
|---|
addColumn, addColumn, addColumn, addColumn, addColumns, addPropertyChangeListener, addPropertyChangeListener, addTupleSetListener, fireTupleEvent, fireTupleEvent, fireTupleEvent, getClientProperty, isAddColumnSupported, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTupleSetListener, tuples, tuples |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.LinkedHashSet m_tuples
| Constructor Detail |
|---|
public DefaultTupleSet()
| Method Detail |
|---|
public int getTupleCount()
TupleSet
getTupleCount in interface TupleSetTupleSet.getTupleCount()public Tuple addTuple(Tuple t)
TupleSet
addTuple in interface TupleSett - the Tuple add
TupleSet.addTuple(prefuse.data.Tuple)public Tuple setTuple(Tuple t)
TupleSet
setTuple in interface TupleSett - the Tuple to set as the content of this TupleSet
TupleSet.setTuple(prefuse.data.Tuple)protected final Tuple addInternal(Tuple t)
t - the Tuple to add
public boolean containsTuple(Tuple t)
TupleSet
containsTuple in interface TupleSett - the tuple to check for containment
TupleSet.containsTuple(prefuse.data.Tuple)public boolean removeTuple(Tuple t)
TupleSet
removeTuple in interface TupleSett - the Tuple to remove
TupleSet.removeTuple(prefuse.data.Tuple)protected final boolean removeInternal(Tuple t)
t - the tuple to remove
public void clear()
TupleSet
clear in interface TupleSetTupleSet.clear()public Tuple[] clearInternal()
public java.util.Iterator tuples()
TupleSet
tuples in interface TupleSetTupleSet.tuples()public Tuple[] toArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||