Module rxmicro.validation
Package io.rxmicro.validation.base
Class AbstractContainerConstraintValidator<T>
- java.lang.Object
-
- io.rxmicro.validation.base.AbstractContainerConstraintValidator<T>
-
- Type Parameters:
T- the type to validate
- All Implemented Interfaces:
ConstraintValidator<T>
- Direct Known Subclasses:
MaxSizeListConstraintValidator,MaxSizeMapConstraintValidator,MaxSizeSetConstraintValidator,MinSizeListConstraintValidator,MinSizeMapConstraintValidator,MinSizeSetConstraintValidator,SizeListConstraintValidator,SizeMapConstraintValidator,SizeSetConstraintValidator,UniqueItemsListConstraintValidator
public abstract class AbstractContainerConstraintValidator<T> extends Object implements ConstraintValidator<T>
Base validator class for container constraints.- Since:
- 0.1
- Author:
- nedis
-
-
Constructor Summary
Constructors Constructor Description AbstractContainerConstraintValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidateIterable(Iterable<T> iterable)Validates all items from the iterable.voidvalidateIterable(Iterable<T> iterable, HttpModelType httpModelType, String modelName)Validates all items from the iterable.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.rxmicro.validation.ConstraintValidator
validate, validate, validateMapValues, validateMapValues
-
-
-
-
Method Detail
-
validateIterable
public final void validateIterable(Iterable<T> iterable, HttpModelType httpModelType, String modelName)
Description copied from interface:ConstraintValidatorValidates all items from the iterable.The state of the
iterablemust not be altered.If the
iterableisnullvalidator does not throwValidationException.- Specified by:
validateIterablein interfaceConstraintValidator<T>- Parameters:
iterable- the iterable to validatehttpModelType- the http model typemodelName- the parameter or header name
-
validateIterable
public final void validateIterable(Iterable<T> iterable)
Description copied from interface:ConstraintValidatorValidates all items from the iterable.The state of the
valuemust not be altered.If the
iterableisnullvalidator does not throwValidationException.- Specified by:
validateIterablein interfaceConstraintValidator<T>- Parameters:
iterable- the iterable to validate
-
-