Class BinaryLogicalFilter

  • All Implemented Interfaces:
    Filter
    Direct Known Subclasses:
    AndFilter, OrFilter

    public abstract class BinaryLogicalFilter
    extends AbstractFilter
    Abstract superclass for binary logical operations, that is "AND" and "OR" operations.
    • Constructor Detail

      • BinaryLogicalFilter

        public BinaryLogicalFilter()
    • Method Detail

      • encode

        public java.lang.StringBuffer encode​(java.lang.StringBuffer buff)
        Description copied from interface: Filter
        Encodes the filter to a StringBuffer.
        Parameters:
        buff - The StringBuffer to encode the filter to
        Returns:
        The same StringBuffer as was given
      • getLogicalOperator

        protected abstract java.lang.String getLogicalOperator()
        Implement this in subclass to return the logical operator, for example "&".
        Returns:
        the logical operator.
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: Filter
        All filters must implement equals.
        Specified by:
        equals in interface Filter
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if the objects are equal.
      • hashCode

        public int hashCode()
        Description copied from interface: Filter
        All filters must implement hashCode.
        Specified by:
        hashCode in interface Filter
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code according to the contract in Object.hashCode()
      • append

        public final BinaryLogicalFilter append​(Filter query)
        Add a query to this logical operation.
        Parameters:
        query - the query to add.
        Returns:
        This instance.