Class ValueMatcher


  • public class ValueMatcher
    extends Object
    This class allows comparison of calendaring values. Each value is represented by an iCalendar value-type element (e.g. text, integer). They can be added to the ValueMatcher object and then that object can be compared to another to determine if the values are equal.
    Author:
    Mike Douglass
    • Constructor Detail

      • ValueMatcher

        public ValueMatcher()
    • Method Detail

      • getComparator

        public <T> ValueComparator getComparator​(T val)
        Parameters:
        val - - value to match
        Returns:
        comparator
      • getElementAndValue

        public Object getElementAndValue​(Object val)
        Called to get a property or parameter object containing only the value. The property or parameter object is a new instance. Its value is copied.
        Parameters:
        val -
        Returns:
        property object containing value only
      • getNormalized

        public List getNormalized​(Object val)
        Parameters:
        val -
        Returns:
        normalized set of objects
      • registerGlobalConverter

        public static void registerGlobalConverter​(Class cl,
                                                   ValueMatcher.ValueConverter vc)
        Register a converter used by all instances of the value matcher.
        Parameters:
        cl -
        vc -
      • registerInstanceConverter

        public void registerInstanceConverter​(Class<?> cl,
                                              ValueMatcher.ValueConverter<?> vc)
        Register a converter used only by this instance of the value matcher.
        Parameters:
        cl -
        vc -