Enum Class ISBN.Type

java.lang.Object
java.lang.Enum<ISBN.Type>
org.hibernate.validator.constraints.ISBN.Type
All Implemented Interfaces:
Serializable, Comparable<ISBN.Type>, Constable
Enclosing class:
ISBN

public static enum ISBN.Type extends Enum<ISBN.Type>
Defines the ISBN length. Valid lengths of ISBNs are 10 and 13 which are represented as ISBN_10 and ISBN_13 respectively.

Using ANY allows to validate values that could either be ISBN10 or ISBN13. In such case, ISBN type would be determined by the length of the corresponding value.

  • Enum Constant Details

    • ISBN_10

      public static final ISBN.Type ISBN_10
    • ISBN_13

      public static final ISBN.Type ISBN_13
    • ANY

      public static final ISBN.Type ANY
  • Method Details

    • values

      public static ISBN.Type[] 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 ISBN.Type 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