public enum ConstraintType extends java.lang.Enum<ConstraintType>
| Enum Constant and Description |
|---|
COMPONENTS_MATCH
Specifies that all elements of a collection or array must satisfy all of a constraint's child constraints in order to satisfy that constraint.
|
COMPOSITE
Specifies that a constraint is a composite constraint.
|
FINAL
Indicates that the value can never be changed after initialization
|
MAXIMUM_LENGTH
Specifies a maximum length.
|
MINIMUM_LENGTH
Specifies a minimum length.
|
NUMERICAL_LOWER_BOUND
Specifies a numerical lower bound.
|
NUMERICAL_UPPER_BOUND
Specifies a numerical upper bound.
|
STRING_MATCHING
Specifies a pattern that must match.
|
| Modifier and Type | Method and Description |
|---|---|
Identifier |
getIdentifier()
Returns the unique identifier for this
ConstraintType. |
boolean |
isNumerical()
Returns whether or not this is a
ConstraintType that operates only on numerical values |
static ConstraintType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConstraintType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConstraintType FINAL
public static final ConstraintType NUMERICAL_LOWER_BOUND
Values must be equal to or greater than the constraint's value to satisfy the constraint.
public static final ConstraintType NUMERICAL_UPPER_BOUND
Values must be equal to or lesser than the constraint's value to satisfy the constraint.
public static final ConstraintType MINIMUM_LENGTH
CharSequences, Collections and arrays.
Values must be of equal or longer length than the constraint's value to satisfy the constraint. For example: a constraint that is checking strings has this constraint type and value 3.
"AB" would not satisfy the constraint
"ABC" and "ABCD" would satisfy the constraint
MAXIMUM_LENGTHpublic static final ConstraintType MAXIMUM_LENGTH
CharSequences, Collections and arrays.
Values must be of equal or shorter length than the constraint's value to satisfy the constraint. For example: a constraint that is checking strings has this constraint type and value 3.
"AB" and "ABC" would satisfy the constraint
"ABCD" would not satisfy the constraint
MINIMUM_LENGTHpublic static final ConstraintType STRING_MATCHING
Values must match the constraint's value, which is a regular expression (regex).
public static final ConstraintType COMPONENTS_MATCH
public static final ConstraintType COMPOSITE
Whether or not a value satisfies a composite constraint is specified by the composite's CompositeType.
public static ConstraintType[] values()
for (ConstraintType c : ConstraintType.values()) System.out.println(c);
public static ConstraintType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean isNumerical()
ConstraintType that operates only on numerical valuestrue if this type is numericalpublic Identifier getIdentifier()
ConstraintType.