Package jadex.commons
Class ComposedFilter<T>
- java.lang.Object
- 
- jadex.commons.ComposedFilter<T>
 
- 
- All Implemented Interfaces:
- IFilter<T>,- java.io.Serializable
 - Direct Known Subclasses:
- TimePatternFilter
 
 public class ComposedFilter<T> extends java.lang.Object implements IFilter<T>, java.io.Serializable A filter checks if an object matches the given subfilters.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ComposedFilter()Create a composed filter.ComposedFilter(IFilter<T>... filters)Create a composed filter.ComposedFilter(IFilter<T>[] filters, int operator)Create a composed filter.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(IFilter<T> filter)Add a filter.booleanequals(java.lang.Object obj)Test if an object is equal to this.booleanfilter(T object)Match an object against the filter.IFilter<T>[]getFilters()Get the filters.intgetOperator()Get the operator.inthashCode()Get the hashcode.static java.lang.StringoperatorToString(int operator)Create a string representation of the operator.voidsetFilters(IFilter<T>[] filters)Set the filters.voidsetOperator(int operator)Set the operator.java.lang.StringtoString()Create a string representation of this filter.
 
- 
- 
- 
Field Detail- 
ANDpublic static final int AND The AND operator.- See Also:
- Constant Field Values
 
 - 
ORpublic static final int OR The OR operator.- See Also:
- Constant Field Values
 
 - 
NOTpublic static final int NOT The NOT operator.- See Also:
- Constant Field Values
 
 - 
operatorprotected int operator The operator.
 
- 
 - 
Method Detail- 
filterpublic boolean filter(T object) Match an object against the filter.
 - 
setFilterspublic void setFilters(IFilter<T>[] filters) Set the filters.- Parameters:
- filters- The filters to set.
 
 - 
getOperatorpublic int getOperator() Get the operator.- Returns:
- the operator.
 
 - 
setOperatorpublic void setOperator(int operator) Set the operator.- Parameters:
- operator- The operator to set.
 
 - 
hashCodepublic int hashCode() Get the hashcode.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if an object is equal to this.- Overrides:
- equalsin class- java.lang.Object
 
 - 
operatorToStringpublic static java.lang.String operatorToString(int operator) Create a string representation of the operator.- Returns:
- A string representing the operator.
 
 - 
toStringpublic java.lang.String toString() Create a string representation of this filter.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- A string representing this filter.
 
 
- 
 
-