Class AbstractFromToMatchesFilter

java.lang.Object
org.jivesoftware.smack.filter.AbstractFromToMatchesFilter
All Implemented Interfaces:
Predicate<Stanza>, StanzaFilter
Direct Known Subclasses:
FromMatchesFilter, ToMatchesFilter

public abstract class AbstractFromToMatchesFilter extends Object implements StanzaFilter
  • Constructor Details

    • AbstractFromToMatchesFilter

      protected AbstractFromToMatchesFilter(org.jxmpp.jid.Jid address, boolean ignoreResourcepart)
      Creates a filter matching on the address returned by getAddressToCompare(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. If null is given, then getAddressToCompare(Stanza) must also return null to match.
      ignoreResourcepart - TODO javadoc me please
    • AbstractFromToMatchesFilter

      protected AbstractFromToMatchesFilter(org.jxmpp.jid.Jid address, org.jivesoftware.smack.filter.AbstractFromToMatchesFilter.MatchMode matchMode)
      Creates a filter matching on the address returned by getAddressToCompare(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. If null is given, then getAddressToCompare(Stanza) must also return null to match.
      matchMode - the match mode.
  • Method Details

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

      protected abstract org.jxmpp.jid.Jid getAddressToCompare(Stanza stanza)
    • toString

      public final String toString()
      Overrides:
      toString in class Object