public class RequiredValidator extends Object implements ConstraintValidator<Required>
null
CharSequence
with length 0Collection
Map
Constructor and Description |
---|
RequiredValidator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(Required annotation)
Called before this validator is used with the constraint annotation value.
|
boolean |
isValid(Object value)
Indicates if the given value is valid.
|
public RequiredValidator()
public void initialize(Required annotation)
ConstraintValidator
initialize
in interface ConstraintValidator<Required>
annotation
- the annotation value this validator will be validating.public boolean isValid(Object value)
ConstraintValidator
isValid
in interface ConstraintValidator<Required>
value
- the value to validate.true
if the given value is valid.Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.