Enum Class Validator.MergeMode

java.lang.Object
java.lang.Enum<Validator.MergeMode>
ch.tocco.nice2.validate.api.validators.Validator.MergeMode
All Implemented Interfaces:
Serializable, Comparable<Validator.MergeMode>, Constable
Enclosing interface:
Validator

public static enum Validator.MergeMode extends Enum<Validator.MergeMode>
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.

  • Enum Constant Details

    • NARROW

      public static final Validator.MergeMode NARROW
      Takes the more pessimistic of the 2 options.
    • EXPAND

      public static final Validator.MergeMode EXPAND
      Takes the more optimistic of the 2 options.
    • IF_MISSING

      public static final Validator.MergeMode IF_MISSING
      Only overwrites a constraint property with the one in the given validator if none was defined so far.
    • OVERRIDE

      public static final Validator.MergeMode OVERRIDE
      Overrides the constraint property with the one in the given validator if the given one has it (not null).
  • Method Details

    • values

      public static Validator.MergeMode[] 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

      public static Validator.MergeMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null