Package org.jivesoftware.smack.filter
Class ToMatchesFilter
- java.lang.Object
-
- org.jivesoftware.smack.filter.AbstractFromToMatchesFilter
-
- org.jivesoftware.smack.filter.ToMatchesFilter
-
- All Implemented Interfaces:
StanzaFilter
,Predicate<Stanza>
public final class ToMatchesFilter extends AbstractFromToMatchesFilter
-
-
Field Summary
Fields Modifier and Type Field Description static ToMatchesFilter
MATCH_NO_TO_SET
-
Constructor Summary
Constructors Constructor Description ToMatchesFilter(Jid address, boolean ignoreResourcepart)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ToMatchesFilter
create(Jid address)
Creates a filter matching on the "to" field.static ToMatchesFilter
createBare(Jid address)
Creates a filter matching on the "to" field.static ToMatchesFilter
createFull(Jid address)
Creates a filter matching on the "to" field.protected Jid
getAddressToCompare(Stanza stanza)
-
Methods inherited from class org.jivesoftware.smack.filter.AbstractFromToMatchesFilter
accept, 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
-
-
-
-
Field Detail
-
MATCH_NO_TO_SET
public static final ToMatchesFilter MATCH_NO_TO_SET
-
-
Constructor Detail
-
ToMatchesFilter
public ToMatchesFilter(Jid address, boolean ignoreResourcepart)
-
-
Method Detail
-
create
public static ToMatchesFilter create(Jid address)
Creates a filter matching on the "to" field. If the filter address is bare, compares the filter address with the bare from address. Otherwise, compares the filter address with the full from address.- Parameters:
address
- The address to filter for. Ifnull
is given, the stanza must not have a from address.- Returns:
- filter matching the "to" address.
-
createBare
public static ToMatchesFilter createBare(Jid address)
Creates a filter matching on the "to" field. Compares the bare version of to and filter address.- Parameters:
address
- The address to filter for. Ifnull
is given, the stanza must not have a from address.- Returns:
- filter matching the "to" address.
-
createFull
public static ToMatchesFilter createFull(Jid address)
Creates a filter matching on the "to" field. Compares the full version, if available, of to and filter address.- Parameters:
address
- The address to filter for. Ifnull
is given, the stanza must not have a from address.- Returns:
- filter matching the "to" address.
-
getAddressToCompare
protected Jid getAddressToCompare(Stanza stanza)
- Specified by:
getAddressToCompare
in classAbstractFromToMatchesFilter
-
-