Represents a cron expression.
| 25 | * Represents a cron expression. |
| 26 | */ |
| 27 | public interface Cron extends Serializable { |
| 28 | |
| 29 | /** |
| 30 | * Retrieve value for cron field. |
| 31 | * |
| 32 | * @param name - cron field name. |
| 33 | * If null, a NullPointerException will be raised. |
| 34 | * @return CronField that corresponds to given CronFieldName |
| 35 | */ |
| 36 | CronField retrieve(final CronFieldName name); |
| 37 | |
| 38 | /** |
| 39 | * Retrieve all cron field values as map. |
| 40 | * |
| 41 | * @return unmodifiable Map with key CronFieldName and values CronField, never null |
| 42 | */ |
| 43 | Map<CronFieldName, CronField> retrieveFieldsAsMap(); |
| 44 | |
| 45 | String asString(); |
| 46 | |
| 47 | CronDefinition getCronDefinition(); |
| 48 | |
| 49 | /** |
| 50 | * Validates this Cron instance by validating its cron expression. |
| 51 | * |
| 52 | * @return this Cron instance |
| 53 | * @throws IllegalArgumentException if the cron expression is invalid |
| 54 | */ |
| 55 | Cron validate(); |
| 56 | |
| 57 | /** |
| 58 | * Provides means to compare if two cron expressions are equivalent. |
| 59 | * |
| 60 | * @param cronMapper - maps 'cron' parameter to this instance definition; |
| 61 | * @param cron - any cron instance, never null |
| 62 | * @return boolean - true if equivalent; false otherwise. |
| 63 | */ |
| 64 | boolean equivalent(final CronMapper cronMapper, final Cron cron); |
| 65 | |
| 66 | /** |
| 67 | * Provides means to compare if two cron expressions are equivalent. |
| 68 | * Assumes same cron definition. |
| 69 | * |
| 70 | * @param cron - any cron instance, never null |
| 71 | * @return boolean - true if equivalent; false otherwise. |
| 72 | */ |
| 73 | boolean equivalent(final Cron cron); |
| 74 | } |
| 75 |
no outgoing calls
no test coverage detected
searching dependent graphs…