Package jadex.commons
Class ComposedRemoteFilter<T>
- java.lang.Object
- 
- jadex.commons.ComposedRemoteFilter<T>
 
- 
- All Implemented Interfaces:
- IAsyncFilter<T>,- java.io.Serializable
 
 public class ComposedRemoteFilter<T> extends java.lang.Object implements IAsyncFilter<T>, java.io.Serializable A filter checks if an object matches the given subfilters.- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface jadex.commons.IAsyncFilterIAsyncFilter.AlwaysFilter<E>, IAsyncFilter.NeverFilter<E>
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intANDThe AND operator.protected IAsyncFilter[]filtersThe filtersstatic intNOTThe NOT operator.protected intoperatorThe operator.static intORThe OR operator.- 
Fields inherited from interface jadex.commons.IAsyncFilterALWAYS, NEVER
 
- 
 - 
Constructor SummaryConstructors Constructor Description ComposedRemoteFilter(IAsyncFilter<T>[] filters)Create a composed filter.ComposedRemoteFilter(IAsyncFilter<T>[] filters, int operator)Create a composed filter.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(IAsyncFilter<T> filter)Add a filter.protected IFuture<java.lang.Boolean>checkAndFilter(java.lang.Object object, IAsyncFilter[] filter, int i)Check and filter.protected IFuture<java.lang.Boolean>checkOrFilter(java.lang.Object object, IAsyncFilter[] filter, int i)Check or filter.booleanequals(java.lang.Object obj)Test if an object is equal to this.IFuture<java.lang.Boolean>filter(java.lang.Object object)Match an object against the filter.IAsyncFilter[]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(IAsyncFilter<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
 
 - 
filtersprotected IAsyncFilter[] filters The filters
 - 
operatorprotected int operator The operator.
 
- 
 - 
Constructor Detail- 
ComposedRemoteFilterpublic ComposedRemoteFilter(IAsyncFilter<T>[] filters) Create a composed filter.- Parameters:
- filters- The filters.
- operator- The operator.
 
 - 
ComposedRemoteFilterpublic ComposedRemoteFilter(IAsyncFilter<T>[] filters, int operator) Create a composed filter.- Parameters:
- filters- The filters.
- operator- The operator.
 
 
- 
 - 
Method Detail- 
filterpublic IFuture<java.lang.Boolean> filter(java.lang.Object object) Match an object against the filter.- Specified by:
- filterin interface- IAsyncFilter<T>
- Parameters:
- object- The object.
- Returns:
- True, if the filter matches.
- Throws:
- java.lang.Exception
 
 - 
checkAndFilterprotected IFuture<java.lang.Boolean> checkAndFilter(java.lang.Object object, IAsyncFilter[] filter, int i) Check and filter.
 - 
checkOrFilterprotected IFuture<java.lang.Boolean> checkOrFilter(java.lang.Object object, IAsyncFilter[] filter, int i) Check or filter.
 - 
getFilterspublic IAsyncFilter[] getFilters() Get the filters.- Returns:
- the filters.
 
 - 
setFilterspublic void setFilters(IAsyncFilter<T>[] filters) Set the filters.- Parameters:
- filters- The filters to set.
 
 - 
addFilterpublic void addFilter(IAsyncFilter<T> filter) Add a filter.- Parameters:
- filter- The filter.
 
 - 
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.
 
 
- 
 
-