Package org.jivesoftware.smack.filter
Class StanzaIdFilter
- java.lang.Object
-
- org.jivesoftware.smack.filter.StanzaIdFilter
-
- All Implemented Interfaces:
StanzaFilter
,Predicate<Stanza>
public class StanzaIdFilter extends java.lang.Object implements StanzaFilter
Filters for Stanzas with a particular stanza ID.
-
-
Constructor Summary
Constructors Constructor Description StanzaIdFilter(java.lang.String stanzaId)
Creates a new stanza ID filter using the specified stanza ID.StanzaIdFilter(Stanza stanza)
Creates a new stanza ID filter using the specified stanza's ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(Stanza stanza)
Tests whether or not the specified stanza should pass the filter.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
-
StanzaIdFilter
public StanzaIdFilter(Stanza stanza)
Creates a new stanza ID filter using the specified stanza's ID.- Parameters:
stanza
- the stanza which the ID is taken from.
-
StanzaIdFilter
public StanzaIdFilter(java.lang.String stanzaId)
Creates a new stanza ID filter using the specified stanza ID.- Parameters:
stanzaId
- the stanza ID to filter for.
-
-
Method Detail
-
accept
public 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-