Package dev.orne.i18n.validation
Class AbstractValidatorForI18nString<T extends Annotation>
java.lang.Object
dev.orne.i18n.validation.AbstractValidatorForI18nString<T>
- Type Parameters:
T
- The constraint type to validate
- All Implemented Interfaces:
javax.validation.ConstraintValidator<T,
I18nString>
- Direct Known Subclasses:
NotBlankValidatorForI18nString
,NotEmptyValidatorForI18nString
,PatternValidatorForI18nString
,SizeValidatorForI18nString
@API(status=STABLE,
since="0.1")
public abstract class AbstractValidatorForI18nString<T extends Annotation>
extends Object
implements javax.validation.ConstraintValidator<T,I18nString>
Abstract implementation of Javax Bean Validation
ConstraintValidator
for I18nString
instances.- Since:
- 0.1
- Version:
- 1.0, 2021-02
- Author:
- (w) Iker Hernaez
- See Also:
-
ConstraintValidator
I18nString
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
isTextValid
(@NotNull String text) Validates if the text is valid.boolean
isValid
(I18nString value, @NotNull javax.validation.ConstraintValidatorContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.validation.ConstraintValidator
initialize
-
Constructor Details
-
AbstractValidatorForI18nString
protected AbstractValidatorForI18nString()Creates a new instance.
-
-
Method Details
-
isValid
public boolean isValid(I18nString value, @NotNull @NotNull javax.validation.ConstraintValidatorContext context) - Specified by:
isValid
in interfacejavax.validation.ConstraintValidator<T extends Annotation,
I18nString>
-
isTextValid
Validates if the text is valid.- Parameters:
text
- The text to validate- Returns:
- If the text is valid
-