Enum Class ISBN.Type
- All Implemented Interfaces:
Serializable, Comparable<ISBN.Type>, Constable
- Enclosing class:
ISBN
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.
- Since:
- 6.0.6
- Author:
- Marko Bekhta
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
ISBN_10
-
ISBN_13
-
ANY
-
-
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
-