Class Filter


  • public class Filter
    extends Object
    Configuration for a filter used during matching operations.
    • Field Detail

      • DEFAULT_FIELD_NAME

        public static final String DEFAULT_FIELD_NAME
        The default field name used by a filter.
        See Also:
        Constant Field Values
      • PROPS_MINVALUE

        public static final String PROPS_MINVALUE
        The threshold value property for a greater-than-or-equal filter
        See Also:
        Constant Field Values
    • Constructor Detail

      • Filter

        public Filter()
        Construct an empty filter.
      • Filter

        public Filter​(FilterType type)
        Construct a filter of the given type.
        Parameters:
        type - the type of filter
      • Filter

        public Filter​(FilterType type,
                      String fieldName)
        Construct a filter of the given type using the given input field name.
        Parameters:
        type - type the type of filter
        fieldName - input field name
      • Filter

        public Filter​(FilterType type,
                      String fieldName,
                      Map<String,​Object> properties)
        Construct a filter of the given type using the given input field name. The properties are specific to an implementation of a filter.
        Parameters:
        type - type the type of filter
        fieldName - input field name
        properties - implementation specific properties
      • Filter

        public Filter​(FilterType type,
                      String fieldName,
                      String propertyName,
                      Object propertyValue)
        Construct a filter of the given type using the given input field name. Set the given property value for the filter. Properties are specific to filter implementations.
        Parameters:
        type - type the type of filter
        fieldName - input field name
        propertyName - property name
        propertyValue - property value
    • Method Detail

      • getType

        public FilterType getType()
        Get the filter type.
        Returns:
        filter type
      • setType

        public void setType​(FilterType type)
        Set the filter type.
        Parameters:
        type - filter type
      • getField

        public String getField()
        Get the input field name to the filter.
        Returns:
        input field name
      • setField

        public void setField​(String fieldName)
        Set the input field name to the filter.
        Parameters:
        fieldName - input field name
      • getProperties

        public Map<String,​Object> getProperties()
        Get the implementation specific properties of the filter.
        Returns:
        implementation specific properties
      • setProperties

        public void setProperties​(Map<String,​Object> properties)
        Set the implementation specific properties of the filter.
        Parameters:
        properties - implementation specific properties
      • setProperty

        public void setProperty​(String name,
                                Object value)
        Set an implementation specific property on a filter.
        Parameters:
        name - name of the property
        value - value of the property