Class NotFilter

  • All Implemented Interfaces:
    Filter

    public final class NotFilter
    extends Object
    implements Filter
    Proxy the filter to return the negative of the value.
    • Constructor Detail

      • NotFilter

        public NotFilter​(Filter filter)
        Take the value returned from the internal filter and NOT it.
    • Method Detail

      • getFilter

        public Filter getFilter()
        Get the internal filter that is being negated.
      • accept

        public boolean accept​(ConnectorObject obj)
        Return the opposite the internal filters return value.
        Specified by:
        accept in interface Filter
        Parameters:
        obj - - The specified ConnectorObject.
        Returns:
        true if the object matches (that is, satisfies all selection criteria of) this filter; otherwise false.
        See Also:
        Filter.accept(ConnectorObject)
      • accept

        public <R,​P> R accept​(FilterVisitor<R,​P> v,
                                    P p)
        Description copied from interface: Filter
        Applies a FilterVisitor to this Filter.
        Specified by:
        accept in interface Filter
        Type Parameters:
        R - The return type of the visitor's methods.
        P - The type of the additional parameters to the visitor's methods.
        Parameters:
        v - The filter visitor.
        p - Optional additional visitor parameter.
        Returns:
        A result as specified by the visitor.