| Modifier and Type | Class and Description |
|---|---|
| private static interface | |
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private ISBNValidator. | |
| private static Pattern | NOT_DIGITS_OR_NOT_X
Pattern to replace all non ISBN characters. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | initialize(ISBN
annotation instance for a given constraint declaration constraintAnnotation)Overrides default jakarta. isValid(Object, ConstraintValidatorContext) calls.
|
| public boolean | isValid(CharSequence
object to validate isbn, ConstraintValidatorContext context in which the constraint is evaluated context)Implements jakarta. |
| isbnValidationAlgorithm | back to summary |
|---|---|
| private ISBNValidator. | |
| NOT_DIGITS_OR_NOT_X | back to summary |
|---|---|
| private static Pattern NOT_DIGITS_OR_NOT_X Pattern to replace all non ISBN characters. ISBN can have digits or 'X'. | |
| ISBNValidator | back to summary |
|---|---|
| public ISBNValidator() | |
| initialize | back to summary |
|---|---|
| public void initialize(ISBN constraintAnnotation) Overrides default jakarta. Doc from jakarta. Initializes the validator in preparation for
This method is guaranteed to be called before any use of this instance for validation. The default implementation is a no-op. | |
| isValid | back to summary |
|---|---|
| public boolean isValid(CharSequence isbn, ConstraintValidatorContext context) Implements jakarta. Doc from jakarta. Implements the validation logic.
The state of This method can be accessed concurrently, thread-safety must be ensured by the implementation.
| |
| Modifier and Type | Method and Description |
|---|---|
| public static ISBNValidator. | |
| public boolean | |
| public boolean |
| from | back to summary |
|---|---|
| public static ISBNValidator. | |
| isValidChecksum | back to summary |
|---|---|
| public boolean isValidChecksum(String isbn) | |
| isValidLength | back to summary |
|---|---|
| public boolean isValidLength(int length) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ISBNValidator. | |
| public static final ISBNValidator. | |
| public static final ISBNValidator. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| private static boolean | |
| public static ISBNValidator. | |
| public static ISBNValidator. |
| ANY | back to summary |
|---|---|
| public static final ISBNValidator. | |
| ISBN_10 | back to summary |
|---|---|
| public static final ISBNValidator. | |
| ISBN_13 | back to summary |
|---|---|
| public static final ISBNValidator. | |
| ISBNValidationAlgorithmImpl | back to summary |
|---|---|
| private ISBNValidationAlgorithmImpl() | |
| checkChecksumISBN10 | back to summary |
|---|---|
| private static boolean checkChecksumISBN10(String isbn) Check the digits for ISBN 10 using algorithm from Wikipedia. | |
| checkChecksumISBN13 | back to summary |
|---|---|
| private static boolean checkChecksumISBN13(String isbn) Check the digits for ISBN 13 using algorithm from Wikipedia. | |
| valueOf | back to summary |
|---|---|
| public static ISBNValidator. | |
| values | back to summary |
|---|---|
| public static ISBNValidator. | |