Class FieldDefinition
java.lang.Object
io.github.projectunified.cronutils.model.field.definition.FieldDefinition
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DayOfWeekFieldDefinition
Represents a definition of allowed values for a cron field.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFieldDefinition(CronFieldName fieldName, FieldConstraints constraints) Mandatory field Constructor.FieldDefinition(CronFieldName fieldName, FieldConstraints constraints, boolean optional) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<FieldDefinition> Creates a field definition comparator.booleanGet field constraints.Retrieve field name.inthashCode()booleanGet optional tag.
-
Constructor Details
-
FieldDefinition
Mandatory field Constructor.- Parameters:
fieldName- - CronFieldName; name of the field if null, a NullPointerException will be raised.constraints- - FieldConstraints, constraints; if null, a NullPointerException will be raised.
-
FieldDefinition
Constructor.- Parameters:
fieldName- - CronFieldName; name of the field if null, a NullPointerException will be raised.constraints- - FieldConstraints, constraints; if null, a NullPointerException will be raised.optional- - iffalsethe field is mandatory, optional otherwise.
-
-
Method Details
-
getFieldName
Retrieve field name.- Returns:
- CronFieldName instance, never null;
-
getConstraints
Get field constraints.- Returns:
- FieldConstraints instance, never null;
-
isOptional
public boolean isOptional()Get optional tag.- Returns:
- optional tag
-
createFieldDefinitionComparator
Creates a field definition comparator. Will compare by CronFieldName order value;- Returns:
- Comparator for FieldDefinition instance, never null;
-
equals
-
hashCode
public int hashCode()
-