Package org.cytoscape.filter.model
Interface CompositeFilter<C,E>
-
- Type Parameters:
C
- The context type of the elements thisFilter
operates on.E
- The element type thisFilter
operates on.
- All Superinterfaces:
Filter<C,E>
,Transformer<C,E>
public interface CompositeFilter<C,E> extends Filter<C,E>
AFilter
that computes the set-union or set-intersection of theFilter
s it contains. The ordering of the child filters does not affect the final output of this filter, but may impact performance.Module:
filter-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>filter-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CompositeFilter.Type
Determines how aCompositeFilter
combines the results of its containedFilter
s.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
append(Filter<C,E> filter)
Appendsfilter
to the list of children.Filter<C,E>
get(int index)
Returns theFilter
at the given index.int
getLength()
Returns the number of direct childrenFilter
s contained by thisCompositeFilter
.CompositeFilter.Type
getType()
Returns the type of combining semantics used by this filter.int
indexOf(Filter<C,E> filter)
Returns the index offilter
within the list of children, or-1
iffilter
is not in that list.void
insert(int index, Filter<C,E> filter)
Insertsfilter
at the given index within the list of children.Filter<C,E>
remove(int index)
Removes theFilter
at the given index from the list of children and returns in.void
setType(CompositeFilter.Type type)
Sets the type of combining semantics used by this filter.-
Methods inherited from interface org.cytoscape.filter.model.Filter
accepts, isAlwaysFalse
-
Methods inherited from interface org.cytoscape.filter.model.Transformer
addListener, getContextType, getElementType, getId, getName, removeListener
-
-
-
-
Method Detail
-
append
void append(Filter<C,E> filter)
Appendsfilter
to the list of children.- Parameters:
filter
- theFilter
to add.
-
insert
void insert(int index, Filter<C,E> filter)
Insertsfilter
at the given index within the list of children.- Parameters:
index
- the index where the filter should be inserted.filter
- theFilter
to add.
-
get
Filter<C,E> get(int index)
Returns theFilter
at the given index.- Parameters:
index
- the index of theFilter
to get.- Returns:
- the
Filter
at the given index.
-
remove
Filter<C,E> remove(int index)
Removes theFilter
at the given index from the list of children and returns in.- Parameters:
index
- the index of theFilter
to get.- Returns:
- the
Filter
at the given index.
-
indexOf
int indexOf(Filter<C,E> filter)
Returns the index offilter
within the list of children, or-1
iffilter
is not in that list.- Parameters:
filter
- thefilter
whose index should be looked up.- Returns:
- the index of
filter
or-1
if it cannot be found.
-
getLength
int getLength()
Returns the number of direct childrenFilter
s contained by thisCompositeFilter
.- Returns:
- the number of direct children.
-
getType
CompositeFilter.Type getType()
Returns the type of combining semantics used by this filter.- Returns:
- the type of combining semantics used by this filter.
-
setType
void setType(CompositeFilter.Type type)
Sets the type of combining semantics used by this filter.- Parameters:
type
- the combining semantics to use.
-
-