Class ComposedFilter

  • All Implemented Interfaces:
    IFilter, java.io.Serializable

    public class ComposedFilter
    extends java.lang.Object
    implements IFilter, java.io.Serializable
    A filter checks if an object matches the given subfilters.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int AND
      The AND operator.
      protected IFilter[] filters
      The filters
      static int NOT
      The NOT operator.
      protected int operator
      The operator.
      static int OR
      The OR operator.
    • Constructor Summary

      Constructors 
      Constructor Description
      ComposedFilter​(IFilter[] filters, int operator)
      Create a composed filter.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean filter​(java.lang.Object object)
      Match an object against the filter.
      java.util.Map getEncodableRepresentation()
      Get the encodable representation.
      static java.lang.String operatorToString​(int operator)
      Create a string representation of the operator.
      java.lang.String toString()
      Create a string representation of this filter.
      • Methods inherited from class java.lang.Object

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

      • ComposedFilter

        public ComposedFilter​(IFilter[] filters,
                              int operator)
        Create a composed filter.
        Parameters:
        filters - The filters.
        operator - The operator.
    • Method Detail

      • filter

        public boolean filter​(java.lang.Object object)
        Match an object against the filter.
        Specified by:
        filter in interface IFilter
        Parameters:
        object - The object.
        Returns:
        True, if the filter matches.
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Create a string representation of this filter.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representing this filter.
      • operatorToString

        public static java.lang.String operatorToString​(int operator)
        Create a string representation of the operator.
        Returns:
        A string representing the operator.
      • getEncodableRepresentation

        public java.util.Map getEncodableRepresentation()
        Get the encodable representation.