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 java.lang.Object implements StanzaFilter
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFromToMatchesFilter(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 boolean
accept(Stanza stanza)
Tests whether or not the specified stanza should pass the filter.protected abstract Jid
getAddressToCompare(Stanza stanza)
java.lang.String
toString()
-
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. Ifnull
is given, thengetAddressToCompare(Stanza)
must also returnnull
to match.ignoreResourcepart
- TODO javadoc me please
-
-
Method Detail
-
accept
public final boolean accept(Stanza stanza)
Description copied from interface:StanzaFilter
Tests whether or not the specified stanza should pass the filter.- Specified by:
accept
in interfaceStanzaFilter
- Parameters:
stanza
- the stanza to test.- Returns:
- true if and only if
stanza
passes the filter.
-
getAddressToCompare
protected abstract Jid getAddressToCompare(Stanza stanza)
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-