Class RebootCron
java.lang.Object
io.github.projectunified.cronutils.model.RebootCron
- All Implemented Interfaces:
Cron,Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRebootCron(CronDefinition cronDefinition) Creates a Cron with the given cron definition and the given fields. -
Method Summary
Modifier and TypeMethodDescriptionasString()booleanequivalent(CronMapper cronMapper, Cron cron) Provides means to compare if two cron expressions are equivalent.booleanequivalent(Cron cron) Provides means to compare if two cron expressions are equivalent.booleanChecks if this cron expression overlaps with another cron expression.retrieve(CronFieldName name) Retrieve value for cron field.Retrieve all cron field values as map.validate()Validates this Cron instance by validating its cron expression.
-
Constructor Details
-
RebootCron
Creates a Cron with the given cron definition and the given fields.- Parameters:
cronDefinition- the definition to use for this Cron
-
-
Method Details
-
retrieve
Retrieve value for cron field. -
retrieveFieldsAsMap
Retrieve all cron field values as map.- Specified by:
retrieveFieldsAsMapin interfaceCron- Returns:
- unmodifiable Map with key CronFieldName and values CronField, never null
-
asString
-
getCronDefinition
- Specified by:
getCronDefinitionin interfaceCron
-
validate
Validates this Cron instance by validating its cron expression.- Specified by:
validatein interfaceCron- Returns:
- this Cron instance
- Throws:
IllegalArgumentException- if the cron expression is invalid
-
equivalent
Provides means to compare if two cron expressions are equivalent.- Specified by:
equivalentin interfaceCron- Parameters:
cronMapper- - maps 'cron' parameter to this instance definition;cron- - any cron instance, never null- Returns:
- boolean - true if equivalent; false otherwise.
-
equivalent
Provides means to compare if two cron expressions are equivalent. Assumes same cron definition.- Specified by:
equivalentin interfaceCron- Parameters:
cron- - any cron instance, never null- Returns:
- boolean - true if equivalent; false otherwise.
-
overlap
Description copied from interface:CronChecks if this cron expression overlaps with another cron expression.
-