Enum Class Constraint.Kind

java.lang.Object
java.lang.Enum<Constraint.Kind>
com.jsgalactic.axiom.validation.Constraint.Kind
All Implemented Interfaces:
Serializable, Comparable<Constraint.Kind>, Constable
Enclosing class:
Constraint

public static enum Constraint.Kind extends Enum<Constraint.Kind>
Kinds of built-in checks.
  • Enum Constant Details

    • NOT_NULL

      public static final Constraint.Kind NOT_NULL
      The value must not be null.
    • NOT_BLANK

      public static final Constraint.Kind NOT_BLANK
      Text must contain a non-whitespace character.
    • NOT_EMPTY

      public static final Constraint.Kind NOT_EMPTY
      Text, collections, maps and arrays must not be empty.
    • LENGTH

      public static final Constraint.Kind LENGTH
      Text length in code points is between min and max.
    • SIZE

      public static final Constraint.Kind SIZE
      Collection size is between min and max.
    • RANGE

      public static final Constraint.Kind RANGE
      A number is between min and max.
    • PATTERN

      public static final Constraint.Kind PATTERN
      The whole text matches pattern.
    • EMAIL

      public static final Constraint.Kind EMAIL
      The text is an e-mail address.
    • ONE_OF

      public static final Constraint.Kind ONE_OF
      The text equals one of values.
  • Method Details

    • values

      public static Constraint.Kind[] 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 Constraint.Kind 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