public abstract class AbstractFilter extends Object implements Filter
| Constructor and Description |
|---|
AbstractFilter(String[] propositionIds)
Instantiates the filter with the proposition ids that it is valid for.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<Filter> |
andIterator()
Returns an iterator over this filter and all subsequent filters in
the chain.
|
int |
chainLength() |
static Filter |
filterArrayToChain(Filter[] filterArray)
Convert an array of
AbstractFilter objects to a chain of
filters by calling the setAnd(org.protempa.backend.dsb.filter.Filter) the method of each filter object. |
Filter[] |
filterChainToArray()
Return an array that contains all of the filters in the chain.
|
Filter |
getAnd()
Returns the next filter in the chain, if specified.
|
String[] |
getPropositionIds()
Returns the proposition ids for which this filter is valid.
|
void |
setAnd(Filter and) |
String |
toString() |
public AbstractFilter(String[] propositionIds)
propositionIds - a proposition id String[]. Cannot be
null , empty or contain null values.public String[] getPropositionIds()
FiltergetPropositionIds in interface FilterString[]. Is guaranteed not to return
null, an empty array or an array containing
null values.public void setAnd(Filter and)
public Filter getAnd()
Filterpublic Iterator<Filter> andIterator()
FilterandIterator in interface FilterIterator.public static Filter filterArrayToChain(Filter[] filterArray)
AbstractFilter objects to a chain of
filters by calling the setAnd(org.protempa.backend.dsb.filter.Filter) the method of each filter object.filterArray - An array of AbstractFilter objects having length
greater than zero.public int chainLength()
public Filter[] filterChainToArray()
filterChainToArray in interface FilterCopyright © 2012–2017 Emory University. All rights reserved.