Class FieldParser
java.lang.Object
io.github.projectunified.cronutils.parser.FieldParser
Parses a field from a cron expression.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intMaps integer values to another integer equivalence.protected FieldValue<?> protected IntegerFieldValuemapToIntegerFieldValue(String string) Parse given expression for a single cron field.protected FieldExpressionparseBetween(String[] array) protected Onprotected OnparseOnWithHash(String exp) protected OnparseOnWithL(String exp) protected OnparseOnWithL(String exp, IntegerFieldValue daysBefore) protected OnparseOnWithLW(String exp) protected Onprotected OnparseOnWithW(String exp) protected intstringToInt(String exp) Maps string expression to integer.
-
Constructor Details
-
FieldParser
-
-
Method Details
-
parse
Parse given expression for a single cron field.- Parameters:
expression- - String- Returns:
- CronFieldExpression object that with interpretation of given String parameter
-
parseBetween
-
parseOn
-
parseOnWithHash
-
parseOnWithQuestionMark
-
parseOnWithLW
-
parseOnWithL
-
parseOnWithL
-
parseOnWithW
-
mapToIntegerFieldValue
-
map
-
stringToInt
Maps string expression to integer. If no mapping is found, will try to parse String as Integer- Parameters:
exp- - expression to be mapped- Returns:
- integer value for string expression
-
intToInt
Maps integer values to another integer equivalence. Always consider mapping higher integers to lower once. Ex.: if 0 and 7 mean the same, map 7 to 0.- Parameters:
exp- - integer to be mapped- Returns:
- Mapping integer. If no mapping int is found, will return exp
-