Class Every
java.lang.Object
io.github.projectunified.cronutils.model.field.expression.FieldExpression
io.github.projectunified.cronutils.model.field.expression.Every
- All Implemented Interfaces:
Serializable
Represents every x time on a cron field.
Usage examples:
- To represent a scheduling every 3 months on a specific time (the standard 0 0 0 */3 *), use the Every(3) constructor
- To represent a scheduling every 3 months FROM NOW, use the Every(on(now.getMonth, 3)) constructor
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEvery(FieldExpression expression, IntegerFieldValue period) Every(IntegerFieldValue time) -
Method Summary
Modifier and TypeMethodDescriptionaccept(FieldExpressionVisitor visitor) Accept a visitor to perform some action on the instance.asString()Represents FieldExpression as string.Methods inherited from class io.github.projectunified.cronutils.model.field.expression.FieldExpression
always, and, questionMark
-
Constructor Details
-
Every
-
Every
-
-
Method Details
-
getPeriod
-
getExpression
-
accept
Description copied from class:FieldExpressionAccept a visitor to perform some action on the instance. Current instance is cloned, so that we ensure immutability. Clone of this instance is returned after visitor.visit(clone) was invoked.- Specified by:
acceptin classFieldExpression- Parameters:
visitor- - FieldExpressionVisitor instance, never null- Returns:
- FieldExpression copied instance with visitor action performed.
-
asString
Description copied from class:FieldExpressionRepresents FieldExpression as string.- Specified by:
asStringin classFieldExpression- Returns:
- String representation, never null.
-