Top Description Constructors Methods
org.hibernate.validator.internal.constraintvalidators.bv.number.sign

public Class NegativeOrZeroValidatorForCharSequence

extends Object
implements ConstraintValidator<NegativeOrZero, CharSequence>
Class Inheritance
All Implemented Interfaces
jakarta.validation.ConstraintValidator
Imports
java.math.BigDecimal, jakarta.validation.ConstraintValidator, .ConstraintValidatorContext, jakarta.validation.constraints.NegativeOrZero

Check that the number being validated is negative or zero.
Author
Guillaume Smet

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isValid(CharSequence
object to validate
value
,
ConstraintValidatorContext
context in which the constraint is evaluated
context
)

Implements jakarta.validation.ConstraintValidator.isValid.

Implements the validation logic.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NegativeOrZeroValidatorForCharSequenceback to summary
public NegativeOrZeroValidatorForCharSequence()

Method Detail

isValidback to summary
public boolean isValid(CharSequence value, ConstraintValidatorContext context)

Implements jakarta.validation.ConstraintValidator.isValid.

Doc from jakarta.validation.ConstraintValidator.isValid.

Implements the validation logic. The state of value must not be altered.

This method can be accessed concurrently, thread-safety must be ensured by the implementation.

Parameters
value:CharSequence

object to validate

context:ConstraintValidatorContext

context in which the constraint is evaluated

Returns:boolean

false if value does not pass the constraint

Annotations
@Override