Package org.jivesoftware.smack.filter
Class AndFilter
java.lang.Object
org.jivesoftware.smack.filter.AbstractListFilter
org.jivesoftware.smack.filter.AndFilter
- All Implemented Interfaces:
Predicate<Stanza>,StanzaFilter
Implements the logical AND operation over two or more stanza filters.
In other words, packets pass this filter if they pass all of the filters.
-
Field Summary
Fields inherited from class org.jivesoftware.smack.filter.AbstractListFilter
filters -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty AND filter.AndFilter(List<StanzaFilter> filters) Creates an AND filter using the specified filters.AndFilter(StanzaFilter... filters) Creates an AND filter using the specified filters. -
Method Summary
Methods inherited from class org.jivesoftware.smack.filter.AbstractListFilter
addFilter, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.filter.StanzaFilter
asPredicate, test
-
Constructor Details
-
AndFilter
public AndFilter()Creates an empty AND filter. Filters should be added using theAbstractListFilter.addFilter(StanzaFilter)method. -
AndFilter
Creates an AND filter using the specified filters.- Parameters:
filters- the filters to add.
-
AndFilter
Creates an AND filter using the specified filters.- Parameters:
filters- the filters to add.
-
-
Method Details
-
accept
Description copied from interface:StanzaFilterTests whether or not the specified stanza should pass the filter.- Specified by:
acceptin interfaceStanzaFilter- Parameters:
packet- the stanza to test.- Returns:
- true if and only if
stanzapasses the filter.
-