Class StanzaIdFilter

java.lang.Object
org.jivesoftware.smack.filter.StanzaIdFilter
All Implemented Interfaces:
Predicate<Stanza>, StanzaFilter

public class StanzaIdFilter extends Object implements StanzaFilter
Filters for Stanzas with a particular stanza ID.
  • Constructor Details

    • StanzaIdFilter

      public StanzaIdFilter(StanzaView 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(String stanzaId)
      Creates a new stanza ID filter using the specified stanza ID.
      Parameters:
      stanzaId - the stanza ID to filter for.
  • Method Details

    • 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 interface StanzaFilter
      Parameters:
      stanza - the stanza to test.
      Returns:
      true if and only if stanza passes the filter.
    • toString

      public String toString()
      Overrides:
      toString in class Object