|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TupleSet
A collection of data tuples. This is the top level interface for all data collections in the prefuse framework.
Tuple
Field Summary | |
---|---|
static Tuple[] |
EMPTY_ARRAY
An empty, zero-length array of tuples. |
Method Summary | |
---|---|
void |
addColumn(java.lang.String name,
java.lang.Class type)
Add a data field / column to this TupleSet's members. |
void |
addColumn(java.lang.String name,
java.lang.Class type,
java.lang.Object defaultValue)
Add a data field / column to this TupleSet's members. |
void |
addColumn(java.lang.String name,
Expression expr)
Add a data field / column to this TupleSet's members. |
void |
addColumn(java.lang.String name,
java.lang.String expr)
Add a data field / column to this TupleSet's members. |
void |
addColumns(Schema s)
Add the data fields of the given Schema to the Tuples in this TupleSet. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
Add a PropertyChangeListener to be notified of changes to the properties bounds to this TupleSet. |
void |
addPropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener lstnr)
Add a PropertyChangeListener to be notified of changes to a specific property bound to this TupleSet. |
Tuple |
addTuple(Tuple t)
Add a Tuple 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. |
void |
clear()
Clear this TupleSet, removing all contained Tuples. |
boolean |
containsTuple(Tuple t)
Indicates if a given Tuple is contained within this TupleSet. |
java.lang.Object |
getClientProperty(java.lang.String key)
Get an client property bound to this TupleSet |
int |
getTupleCount()
Get the number of tuples in this set. |
boolean |
isAddColumnSupported()
Indicates if this TupleSet supports the addition of data columns to its contained Tuple instances. |
void |
putClientProperty(java.lang.String key,
java.lang.Object value)
Set an arbitrary client property with this TupleSet |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
Remove a PropertyChangeListener from this TupleSet. |
void |
removePropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener lstnr)
Remove a PropertyChangeListener from this TupleSet for a specific bound property. |
boolean |
removeTuple(Tuple t)
Remove a Tuple from this TupleSet. |
void |
removeTupleSetListener(TupleSetListener tsl)
Remove a listener from this tuple set. |
Tuple |
setTuple(Tuple t)
Set the TupleSet contents to be a single Tuple. |
java.util.Iterator |
tuples()
Return an iterator over the tuples in 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 |
Field Detail |
---|
static final Tuple[] EMPTY_ARRAY
Method Detail |
---|
Tuple addTuple(Tuple t)
t
- the Tuple add
Tuple setTuple(Tuple t)
t
- the Tuple to set as the content of this TupleSet
boolean removeTuple(Tuple t)
t
- the Tuple to remove
void clear()
boolean containsTuple(Tuple t)
t
- the tuple to check for containment
int getTupleCount()
boolean isAddColumnSupported()
void addColumns(Schema s)
s
- the Schema of data columns to add to this TupleSetvoid addColumn(java.lang.String name, java.lang.Class type)
name
- the name of the data fieldtype
- the type of the data fieldvoid addColumn(java.lang.String name, java.lang.Class type, java.lang.Object defaultValue)
name
- the name of the data fieldtype
- the type of the data fielddefaultValue
- the defaultValue of the data fieldvoid addColumn(java.lang.String name, java.lang.String expr)
name
- 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.prefuse.data.expression
,
ExpressionParser
void addColumn(java.lang.String name, Expression expr)
name
- 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.prefuse.data.expression
java.util.Iterator tuples()
java.util.Iterator tuples(Predicate filter)
filter
- predicate to apply to tuples in this set, only tuples
for which the predicate evaluates to true are included in the iteration
java.util.Iterator tuples(Predicate filter, Sort sort)
filter
- 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 tuples
void addTupleSetListener(TupleSetListener tsl)
tsl
- the TupleSetListener to addvoid removeTupleSetListener(TupleSetListener tsl)
tsl
- the TupleSetListener to removevoid addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
lstnr
- the PropertyChangeListener to addvoid addPropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener lstnr)
key
- the specific key for which to listen to properties changeslstnr
- the PropertyChangeListener to addvoid removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
lstnr
- the PropertyChangeListener to removevoid removePropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener lstnr)
key
- the specific key for which to remove the listenerlstnr
- the PropertyChangeListener to removevoid putClientProperty(java.lang.String key, java.lang.Object value)
key
- the name of the property to setvalue
- the value of the property to usejava.lang.Object getClientProperty(java.lang.String key)
key
- the name of the property to retrieve
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |