public abstract class AbstractTupleSet extends java.lang.Object implements TupleSet
EMPTY_ARRAY| Constructor and Description |
|---|
AbstractTupleSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(java.lang.String name,
java.lang.Class type)
Unsupported by default.
|
void |
addColumn(java.lang.String name,
java.lang.Class type,
java.lang.Object defaultValue)
Unsupported by default.
|
void |
addColumn(java.lang.String name,
Expression expr)
Unsupported by default.
|
void |
addColumn(java.lang.String name,
java.lang.String expr)
Unsupported by default.
|
void |
addColumns(Schema schema)
Add the data fields of the given Schema to the Tuples in this TupleSet.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to be notified of changes to the properties
bounds to this TupleSet.
|
void |
addPropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to be notified of changes to a
specific property bound to this TupleSet.
|
void |
addTupleSetListener(TupleSetListener tsl)
Add a listener to this tuple set that will be notified when tuples
are added and removed from the set.
|
protected void |
fireTupleEvent(Table t,
int start,
int end,
int type)
Fire a Tuple event.
|
protected void |
fireTupleEvent(Tuple[] added,
Tuple[] removed)
Fire a Tuple event.
|
protected void |
fireTupleEvent(Tuple t,
int type)
Fire a Tuple event.
|
java.lang.Object |
getClientProperty(java.lang.String key)
Get an client property bound to this TupleSet
|
boolean |
isAddColumnSupported()
False by default.
|
void |
putClientProperty(java.lang.String key,
java.lang.Object value)
Set an arbitrary client property with this TupleSet
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from this TupleSet.
|
void |
removePropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from this TupleSet for a specific
bound property.
|
void |
removeTupleSetListener(TupleSetListener tsl)
Remove a listener from this tuple set.
|
java.util.Iterator |
tuples(Predicate filter)
Return an iterator over the tuples in this tuple set, filtered by
the given predicate.
|
java.util.Iterator |
tuples(Predicate filter,
Sort sort)
Return an iterator over the tuples in this tuple set, filtered by
the given predicate
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTuple, clear, containsTuple, getTupleCount, removeTuple, setTuple, tuplespublic java.util.Iterator tuples(Predicate filter)
TupleSettuples in interface TupleSetfilter - predicate to apply to tuples in this set, only tuples
for which the predicate evaluates to true are included in the iterationTupleSet.tuples(prefuse.data.expression.Predicate)public java.util.Iterator tuples(Predicate filter, Sort sort)
TupleSettuples in interface TupleSetfilter - predicate to apply to tuples in this set, only tuples
for which the predicate evaluates to true are included in the iteration.
If this value is null, no filtering will be performed.sort - the sorting criteria by which to order the returned tuplesTupleSet.tuples(prefuse.data.expression.Predicate, prefuse.data.util.Sort)public void addTupleSetListener(TupleSetListener tsl)
TupleSetaddTupleSetListener in interface TupleSettsl - the TupleSetListener to addTupleSet.addTupleSetListener(prefuse.data.event.TupleSetListener)public void removeTupleSetListener(TupleSetListener tsl)
TupleSetremoveTupleSetListener in interface TupleSettsl - the TupleSetListener to removeTupleSet.removeTupleSetListener(prefuse.data.event.TupleSetListener)protected void fireTupleEvent(Table t, int start, int end, int type)
t - the Table on which the event has occurredstart - the first row changedend - the last row changedtype - the type of event, one of
EventConstants.INSERT or
EventConstants.DELETE.protected void fireTupleEvent(Tuple t, int type)
t - the tuple that has been added or removedtype - the type of event, one of
EventConstants.INSERT or
EventConstants.DELETE.protected void fireTupleEvent(Tuple[] added, Tuple[] removed)
added - array of Tuples that have been added, can be nullremoved - array of Tuples that have been removed, can be nullpublic boolean isAddColumnSupported()
isAddColumnSupported in interface TupleSetTupleSet.isAddColumnSupported()public void addColumns(Schema schema)
TupleSetaddColumns in interface TupleSetschema - the Schema of data columns to add to this TupleSetTupleSet.addColumns(prefuse.data.Schema)public void addColumn(java.lang.String name,
java.lang.Class type,
java.lang.Object defaultValue)
addColumn in interface TupleSetname - the name of the data fieldtype - the type of the data fielddefaultValue - the defaultValue of the data fieldTupleSet.addColumn(java.lang.String, java.lang.Class, java.lang.Object)public void addColumn(java.lang.String name,
java.lang.Class type)
addColumn in interface TupleSetname - the name of the data fieldtype - the type of the data fieldTupleSet.addColumn(java.lang.String, java.lang.Class)public void addColumn(java.lang.String name,
Expression expr)
addColumn in interface TupleSetname - the name of the data fieldexpr - a compiled expression in the prefuse expression
language. The results of applying the expression to a Tuple will
become the data field value for that Tuple.TupleSet.addColumn(java.lang.String, prefuse.data.expression.Expression)public void addColumn(java.lang.String name,
java.lang.String expr)
addColumn in interface TupleSetname - the name of the data fieldexpr - an uncompiled expression in the prefuse expression
language. This will be compiled to a valid expression, and the
results of applying the expression to a Tuple will become the
data field value for that Tuple.TupleSet.addColumn(java.lang.String, java.lang.String)public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
TupleSetaddPropertyChangeListener in interface TupleSetlistener - the PropertyChangeListener to addTupleSet.addPropertyChangeListener(java.beans.PropertyChangeListener)public void addPropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
TupleSetaddPropertyChangeListener in interface TupleSetkey - the specific key for which to listen to properties changeslistener - the PropertyChangeListener to addTupleSet.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
TupleSetremovePropertyChangeListener in interface TupleSetlistener - the PropertyChangeListener to removeTupleSet.removePropertyChangeListener(java.beans.PropertyChangeListener)public void removePropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
TupleSetremovePropertyChangeListener in interface TupleSetkey - the specific key for which to remove the listenerlistener - the PropertyChangeListener to removeTupleSet.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)public void putClientProperty(java.lang.String key,
java.lang.Object value)
TupleSetputClientProperty in interface TupleSetkey - the name of the property to setvalue - the value of the property to useTupleSet.putClientProperty(java.lang.String, java.lang.Object)public java.lang.Object getClientProperty(java.lang.String key)
TupleSetgetClientProperty in interface TupleSetkey - the name of the property to retrieveTupleSet.getClientProperty(java.lang.String)