Package org.jivesoftware.smack.filter
Class OrFilter
java.lang.Object
org.jivesoftware.smack.filter.AbstractListFilter
org.jivesoftware.smack.filter.OrFilter
- All Implemented Interfaces:
Predicate<Stanza>,StanzaFilter
Implements the logical OR operation over two or more stanza filters. In
other words, packets pass this filter if they pass any of the filters.
-
Field Summary
Fields inherited from class org.jivesoftware.smack.filter.AbstractListFilter
filters -
Constructor Summary
ConstructorsConstructorDescriptionOrFilter()Creates an empty OR filter.OrFilter(StanzaFilter... filters) Creates an OR 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
-
OrFilter
public OrFilter()Creates an empty OR filter. Filters should be added using theAbstractListFilter.addFilter(StanzaFilter)method. -
OrFilter
Creates an OR 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.
-