Class NotFilter

  • All Implemented Interfaces:
    StanzaFilter, Predicate<Stanza>

    public class NotFilter
    extends java.lang.Object
    implements StanzaFilter
    Implements the logical NOT operation on a stanza filter. In other words, packets pass this filter if they do not pass the supplied filter.
    • Constructor Summary

      Constructors 
      Constructor Description
      NotFilter​(StanzaFilter filter)
      Creates a NOT filter using the specified filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(Stanza packet)
      Tests whether or not the specified stanza should pass the filter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NotFilter

        public NotFilter​(StanzaFilter filter)
        Creates a NOT filter using the specified filter.
        Parameters:
        filter - the filter.
    • Method Detail

      • accept

        public boolean accept​(Stanza packet)
        Description copied from interface: StanzaFilter
        Tests whether or not the specified stanza should pass the filter.
        Specified by:
        accept in interface StanzaFilter
        Parameters:
        packet - the stanza to test.
        Returns:
        true if and only if stanza passes the filter.