Class TimeMatcherFactory

java.lang.Object
org.apache.juneau.objecttools.MatcherFactory
org.apache.juneau.objecttools.TimeMatcherFactory

public class TimeMatcherFactory extends MatcherFactory
Date/time matcher factory for the ObjectSearcher class.

The class provides searching based on the following patterns:

  • "property=2011" - A single year
  • "property=2011 2013 2015" - Multiple years
  • "property=2011-01" - A single month
  • "property=2011-01-01" - A single day
  • "property=2011-01-01T12" - A single hour
  • "property=2011-01-01T12:30" - A single minute
  • "property=2011-01-01T12:30:45" - A single second
  • "property=>2011","property=>=2011","property=<2011","property=<=2011" - Open-ended ranges
  • "property=>2011","property=>=2011","property=<2011","property=<=2011" - Open-ended ranges
  • "property=2011 - 2013-06-30" - Closed ranges
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • canMatch

      public boolean canMatch(ClassMeta<?> cm)
      Description copied from class: MatcherFactory
      Returns true if this matcher can be used on the specified object.
      Specified by:
      canMatch in class MatcherFactory
      Parameters:
      cm - The class type of the object being matched. Never null.
      Returns:
      true if this matcher can be used on the specified object.
    • create

      public AbstractMatcher create(String pattern)
      Description copied from class: MatcherFactory
      Instantiates a matcher for the specified pattern.
      Specified by:
      create in class MatcherFactory
      Parameters:
      pattern - The pattern string.
      Returns:
      A matcher for the specified pattern.