Package dev.morphia.query.validation
Class DoubleTypeValidator
- java.lang.Object
-
- dev.morphia.query.validation.TypeValidator
-
- dev.morphia.query.validation.DoubleTypeValidator
-
- All Implemented Interfaces:
Validator
public final class DoubleTypeValidator extends TypeValidator
Validation for fields of Double/double type. Allows numbers that could be compared against double as the values.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanappliesTo(java.lang.Class<?> type)Used by apply to figure out whether to apply the validation or simply return.static DoubleTypeValidatorgetInstance()Get the instance.protected voidvalidate(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)-
Methods inherited from class dev.morphia.query.validation.TypeValidator
apply
-
-
-
-
Method Detail
-
getInstance
public static DoubleTypeValidator getInstance()
Get the instance.- Returns:
- the Singleton instance of this validator
-
appliesTo
protected boolean appliesTo(java.lang.Class<?> type)
Description copied from class:TypeValidatorUsed by apply to figure out whether to apply the validation or simply return.- Specified by:
appliesToin classTypeValidator- Parameters:
type- the type to be validated- Returns:
- true if this validator applies to this type, false otherwise
-
validate
protected void validate(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)- Specified by:
validatein classTypeValidator
-
-