Class ParameterElementFilter

  • All Implemented Interfaces:
    IFilter, java.io.Serializable
    Direct Known Subclasses:
    ComponentFilter, MessageFilter

    public class ParameterElementFilter
    extends java.lang.Object
    implements IFilter, java.io.Serializable
    The parameter element filter filters ParameterElement objects based on their parameter values. Parameter values of elements can be matched against required values, or recursively against other filters. When more than one value and / or filter is specified for an attribute, only one of those has to match.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected MultiCollection<java.lang.String,​java.lang.Object> values
      The required attribute values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(java.lang.String name, java.lang.Object value)
      Add a required attribute value.
      boolean containsValue​(java.lang.String name, java.lang.Object value)
      Returns true if the filter contains the given attribute value.
      boolean filter​(java.lang.Object object)
      Match an object against the filter.
      boolean hasValues()  
      void removeValue​(java.lang.String name, java.lang.Object value)
      Removes an attribute value.
      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
    • Field Detail

      • values

        protected MultiCollection<java.lang.String,​java.lang.Object> values
        The required attribute values.
    • Constructor Detail

      • ParameterElementFilter

        public ParameterElementFilter()
    • Method Detail

      • addValue

        public void addValue​(java.lang.String name,
                             java.lang.Object value)
        Add a required attribute value. The attribute value is checked with equals().
        Parameters:
        name - The attribute name.
        value - The attribute value.
      • removeValue

        public void removeValue​(java.lang.String name,
                                java.lang.Object value)
        Removes an attribute value.
        Parameters:
        name - The attribute name.
        value - The attribute value.
      • containsValue

        public boolean containsValue​(java.lang.String name,
                                     java.lang.Object value)
        Returns true if the filter contains the given attribute value.
        Parameters:
        name - The attribute name.
        value - The attribute value.
        Returns:
        true if the filter contains the given attribute value.
      • hasValues

        public boolean hasValues()
        Returns:
        true if the filter has values.
      • 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.