java.lang.Object
com.aoapps.cron.Matcher
- Direct Known Subclasses:
Matcher.Asterisk
,Matcher.List
,Matcher.Range
,Matcher.Step
,Matcher.Value
Matches individual values within a Schedule.
- Author:
- AO Industries, Inc.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Matches any value.static class
Matches any of a list.static class
Matches a specific range.static class
Matches a step.static class
Matches a single value. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
matches
(int value) Checks if matches the given value.static Matcher
parseDayOfMonth
(String str) Parses a dayOfMonth matcher.static Matcher
parseDayOfWeek
(String str) Parses a dayOfWeek matcher.static Matcher
Parses a hour matcher.static Matcher
parseMatcher
(String str, int minimum, int maximum, int modulus, Map<String, Integer> nameMap) Parses a cron value, supporting lists, asterisk, and ranges, and steps.static Matcher
parseMinute
(String str) Parses a minute matcher.static Matcher
parseMonth
(String str) Parses a month matcher.
-
Constructor Details
-
Matcher
public Matcher()
-
-
Method Details
-
matches
public abstract boolean matches(int value) Checks if matches the given value. -
parseMinute
Parses a minute matcher.- Throws:
IllegalArgumentException
-
parseHour
Parses a hour matcher.- Throws:
IllegalArgumentException
-
parseDayOfMonth
Parses a dayOfMonth matcher.- Throws:
IllegalArgumentException
-
parseMonth
Parses a month matcher. Note: months are 1-12 like cron, not 0-11 like Calendar.- Throws:
IllegalArgumentException
-
parseDayOfWeek
Parses a dayOfWeek matcher. Note: Monday is 1, not 2 like Calendar.- Throws:
IllegalArgumentException
-
parseMatcher
public static Matcher parseMatcher(String str, int minimum, int maximum, int modulus, Map<String, Integer> nameMap) throws IllegalArgumentExceptionParses a cron value, supporting lists, asterisk, and ranges, and steps.- Throws:
IllegalArgumentException
-