MCPcopy Create free account
hub / github.com/jmrozanec/cron-utils / Cron

Interface Cron

src/main/java/com/cronutils/model/Cron.java:27–74  ·  view source on GitHub ↗

Represents a cron expression.

Source from the content-addressed store, hash-verified

25 * Represents a cron expression.
26 */
27public 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

Callers 43

testParserMethod · 0.95
validateMethod · 0.65
retrieveMethod · 0.65
mapMethod · 0.65
setQuestionMarkMethod · 0.65
validateMethod · 0.65
retrieveFieldsAsMapMethod · 0.65
setQuestionMarkMethod · 0.65
describeMethod · 0.65

Implementers 4

RebootCronsrc/main/java/com/cronutils/model/Rebo
CompositeCronsrc/main/java/com/cronutils/model/Comp
SingleCronsrc/main/java/com/cronutils/model/Sing
CompositeCronTestsrc/test/java/com/cronutils/model/Comp

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…