Package org.jivesoftware.smack.filter
Class AbstractFromToMatchesFilter
- java.lang.Object
-
- org.jivesoftware.smack.filter.AbstractFromToMatchesFilter
-
- All Implemented Interfaces:
StanzaFilter,Predicate<Stanza>
- Direct Known Subclasses:
FromMatchesFilter,ToMatchesFilter
public abstract class AbstractFromToMatchesFilter extends Object implements StanzaFilter
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFromToMatchesFilter(Jid address, boolean ignoreResourcepart)Creates a filter matching on the address returned bygetAddressToCompare(Stanza).
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaccept(Stanza stanza)Tests whether or not the specified stanza should pass the filter.protected abstract JidgetAddressToCompare(Stanza stanza)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.filter.StanzaFilter
asPredicate, test
-
-
-
-
Constructor Detail
-
AbstractFromToMatchesFilter
protected AbstractFromToMatchesFilter(Jid address, boolean ignoreResourcepart)
Creates a filter matching on the address returned bygetAddressToCompare(Stanza). The address must be the same as the filter address. The second parameter specifies whether the full or the bare addresses are compared.- Parameters:
address- The address to filter for. Ifnullis given, thengetAddressToCompare(Stanza)must also returnnullto match.ignoreResourcepart- TODO javadoc me please
-
-
Method Detail
-
accept
public final boolean accept(Stanza stanza)
Description copied from interface:StanzaFilterTests whether or not the specified stanza should pass the filter.- Specified by:
acceptin interfaceStanzaFilter- Parameters:
stanza- the stanza to test.- Returns:
- true if and only if
stanzapasses the filter.
-
getAddressToCompare
protected abstract Jid getAddressToCompare(Stanza stanza)
-
-