Enum Class Validator.MergeMode
- All Implemented Interfaces:
Serializable
,Comparable<Validator.MergeMode>
,Constable
- Enclosing interface:
Validator
Defines how to merge the constraint properties of two validators.
For example a NARROW merge on 2 date validators takes the later start date and earlier end date.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionTakes the more optimistic of the 2 options.Only overwrites a constraint property with the one in the given validator if none was defined so far.Takes the more pessimistic of the 2 options.Overrides the constraint property with the one in the given validator if the given one has it (not null). -
Method Summary
Modifier and TypeMethodDescriptionstatic Validator.MergeMode
Returns the enum constant of this class with the specified name.static Validator.MergeMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NARROW
Takes the more pessimistic of the 2 options. -
EXPAND
Takes the more optimistic of the 2 options. -
IF_MISSING
Only overwrites a constraint property with the one in the given validator if none was defined so far. -
OVERRIDE
Overrides the constraint property with the one in the given validator if the given one has it (not null).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-