| Package | Description |
|---|---|
| com.holonplatform.core | |
| com.holonplatform.core.internal | |
| com.holonplatform.core.property |
| Modifier and Type | Method and Description |
|---|---|
static <T> Validator<T> |
Validator.create(Predicate<T> predicate,
Localizable message)
|
static <T> Validator<T> |
Validator.create(Predicate<T> predicate,
String message)
|
static <T> Validator<T> |
Validator.create(Predicate<T> predicate,
String message,
String messageCode,
Object... messageAguments)
|
static <T extends Number> |
Validator.digits(int integral,
int fractional)
Build a validator that checks that given
Number value is a number within accepted range, using default
Validator.ValidationMessage.DIGITS message as validation error message. |
static <T extends Number> |
Validator.digits(int integral,
int fractional,
Localizable message)
Build a validator that checks that given
Number value is a number within accepted range, using given
Localizable message as validation error message. |
static <T extends Number> |
Validator.digits(int integral,
int fractional,
String message,
String messageCode)
Build a validator that checks that given
Number value is a number within accepted range. |
static <T extends CharSequence> |
Validator.email()
Build a validator that checks that the value is a valid e-mail address using RFC822 format rules, and uses
default
Validator.ValidationMessage.EMAIL message as validation error message. |
static <T extends CharSequence> |
Validator.email(Localizable message)
Build a validator that checks that the value is a valid e-mail address using RFC822 format rules, and uses given
Localizable message as validation error message. |
static <T extends CharSequence> |
Validator.email(String message,
String messageCode)
Build a validator that checks that the value is a valid e-mail address using RFC822 format rules.
|
static <T extends Date> |
Validator.future(boolean includeTime)
Build a validator that checks that given
Date value is in the future, using default
Validator.ValidationMessage.FUTURE message as validation error message. |
static <T extends Date> |
Validator.future(boolean includeTime,
Localizable message)
Build a validator that checks that given
Date value is in the future, using given Localizable
message as validation error message. |
static <T extends Date> |
Validator.future(boolean includeTime,
String message,
String messageCode)
Build a validator that checks that given
Date value is in the future. |
static <T extends Comparable<T>> |
Validator.greaterOrEqual(T compareTo)
Build a validator that checks that a value is greater than or equal to given
compareTo value, and
uses default Validator.ValidationMessage.GREATER_OR_EQUAL message as validation error message. |
static <T extends Comparable<T>> |
Validator.greaterOrEqual(T compareTo,
Localizable message)
Build a validator that checks that a value is greater than or equal to given
compareTo value, and
uses given Localizable message as validation error message. |
static <T extends Comparable<T>> |
Validator.greaterOrEqual(T compareTo,
String message,
String messageCode)
Build a validator that checks that a value is greater than or equal to given
compareTo value. |
static <T extends Comparable<T>> |
Validator.greaterThan(T compareTo)
Build a validator that checks that a value is greater than given
compareTo value, and uses default
Validator.ValidationMessage.LESS_THAN message as validation error message. |
static <T extends Comparable<T>> |
Validator.greaterThan(T compareTo,
Localizable message)
Build a validator that checks that a value is greater than given
compareTo value, and uses given
Localizable message as validation error message. |
static <T extends Comparable<T>> |
Validator.greaterThan(T compareTo,
String message,
String messageCode)
Build a validator that checks that a value is greater than given
compareTo value. |
static <T> Validator<T> |
Validator.in(Localizable message,
T... values)
Build a validator that checks that given value is not
null and equals to one of the given values,
using given Localizable message as validation error. |
static <T> Validator<T> |
Validator.in(String message,
String messageCode,
T... values)
Build a validator that checks that given value is not
null and equals to one of the given values. |
static <T> Validator<T> |
Validator.in(T... values)
Build a validator that checks that given value is not
null and equals to one of the given values,
using default Validator.ValidationMessage.IN ad validation error message. |
static <T> Validator<T> |
Validator.isNull()
Build a validator that checks that given value is
null and uses default
Validator.ValidationMessage.NULL localizable message as validation error message. |
static <T> Validator<T> |
Validator.isNull(Localizable message)
Build a validator that checks that given value is
null and uses given Localizable
message as validation error message. |
static <T> Validator<T> |
Validator.isNull(String message,
String messageCode)
Build a validator that checks that given value is
null. |
static <T extends Comparable<T>> |
Validator.lessOrEqual(T compareTo)
Build a validator that checks that a value is less than or equal to given
compareTo value, and uses
default Validator.ValidationMessage.LESS_OR_EQUAL message as validation error message. |
static <T extends Comparable<T>> |
Validator.lessOrEqual(T compareTo,
Localizable message)
Build a validator that checks that a value is less than or equal to given
compareTo value, and uses
given Localizable message as validation error message. |
static <T extends Comparable<T>> |
Validator.lessOrEqual(T compareTo,
String message,
String messageCode)
Build a validator that checks that a value is less than or equal to given
compareTo value. |
static <T extends Comparable<T>> |
Validator.lessThan(T compareTo)
Build a validator that checks that a value is less than given
compareTo value, and uses default
Validator.ValidationMessage.LESS_THAN message as validation error message. |
static <T extends Comparable<T>> |
Validator.lessThan(T compareTo,
Localizable message)
Build a validator that checks that a value is less than given
compareTo value, and uses given
Localizable message as validation error message. |
static <T extends Comparable<T>> |
Validator.lessThan(T compareTo,
String message,
String messageCode)
Build a validator that checks that a value is less than given
compareTo value. |
static <T> Validator<T> |
Validator.max(double max)
Build a validator that checks that given value is lower than or equal to
max value, and uses
Validator.ValidationMessage.MAX as validation error message. |
static <T> Validator<T> |
Validator.max(double max,
Localizable message)
Build a validator that checks that given value is lower than or equal to
max value, and uses given
Localizable message as validation error message. |
static <T> Validator<T> |
Validator.max(double max,
String message,
String messageCode)
Build a validator that checks that given value is lower than or equal to
max value. |
static <T> Validator<T> |
Validator.min(double min)
Build a validator that checks that given value is greater than or equal to
min value, and uses
Validator.ValidationMessage.MAX as validation error message. |
static <T> Validator<T> |
Validator.min(double min,
Localizable message)
Build a validator that checks that given value is greater than or equal to
min value, and uses given
Localizable message as validation error message. |
static <T> Validator<T> |
Validator.min(double min,
String message,
String messageCode)
Build a validator that checks that given value is greater than or equal to
min value. |
static <T extends CharSequence> |
Validator.notBlank()
Build a validator that checks that given value is not
null nor empty, trimming spaces, and uses
default Validator.ValidationMessage.NOT_EMPTY localizable message as validation error message. |
static <T extends CharSequence> |
Validator.notBlank(Localizable message)
Build a validator that checks that given value is not
null nor empty, trimming spaces, and uses
given Localizable message as validation error message. |
static <T extends CharSequence> |
Validator.notBlank(String message,
String messageCode)
Build a validator that checks that given value is not
null nor empty, trimming spaces. |
static <T> Validator<T> |
Validator.notEmpty()
Build a validator that checks that given value is not
null nor empty, and uses default
Validator.ValidationMessage.NOT_EMPTY localizable message as validation error message. |
static <T> Validator<T> |
Validator.notEmpty(Localizable message)
Build a validator that checks that given value is not
null nor empty, and uses given
Localizable message as validation error message. |
static <T> Validator<T> |
Validator.notEmpty(String message,
String messageCode)
Build a validator that checks that given value is not
null nor empty. |
static <T> Validator<T> |
Validator.notIn(Localizable message,
T... values)
Build a validator that checks that given value not equals to any of the given values, using given
Localizable message as validation error. |
static <T> Validator<T> |
Validator.notIn(String message,
String messageCode,
T... values)
Build a validator that checks that given value not equals to any of the given values.
|
static <T> Validator<T> |
Validator.notIn(T... values)
Build a validator that checks that given value not equals to any of the given values, using default
Validator.ValidationMessage.NOT_IN ad validation error message. |
static <T extends Number> |
Validator.notNegative()
Build a validator that checks that given
Number value is not negative, using default
Validator.ValidationMessage.NOT_NEGATIVE message as validation error message. |
static <T extends Number> |
Validator.notNegative(Localizable message)
Build a validator that checks that given
Number value is not negative, using given Localizable
message as validation error message. |
static <T extends Number> |
Validator.notNegative(String message,
String messageCode)
Build a validator that checks that given
Number value is not negative. |
static <T> Validator<T> |
Validator.notNull()
Build a validator that checks that given value is not
null and uses default
Validator.ValidationMessage.NOT_NULL localizable message as validation error message. |
static <T> Validator<T> |
Validator.notNull(Localizable message)
Build a validator that checks that given value is not
null and uses given Localizable
message as validation error message. |
static <T> Validator<T> |
Validator.notNull(String message,
String messageCode)
Build a validator that checks that given value is not
null. |
static <T extends Number> |
Validator.notZero()
Build a validator that checks that given
Number value is not 0, using default
Validator.ValidationMessage.NOT_ZERO message as validation error message. |
static <T extends Number> |
Validator.notZero(Localizable message)
Build a validator that checks that given
Number value is not 0, using given
Localizable message as validation error message. |
static <T extends Number> |
Validator.notZero(String message,
String messageCode)
Build a validator that checks that given
Number value is not 0. |
static <T extends Date> |
Validator.past(boolean includeTime)
Build a validator that checks that given
Date value is in the past, using default
Validator.ValidationMessage.PAST message as validation error message. |
static <T extends Date> |
Validator.past(boolean includeTime,
Localizable message)
Build a validator that checks that given
Date value is in the past, using given Localizable
message as validation error message. |
static <T extends Date> |
Validator.past(boolean includeTime,
String message,
String messageCode)
Build a validator that checks that given
Date value is in the past. |
static <T extends CharSequence> |
Validator.pattern(String regex,
Localizable message,
Validator.PatternFlag... flags)
Build a validator that checks that given value matches a regular expression, and uses given
Localizable
message as validation error message. |
static <T extends CharSequence> |
Validator.pattern(String regex,
String message,
String messageCode,
Validator.PatternFlag... flags)
Build a validator that checks that given value matches a regular expression.
|
static <T extends CharSequence> |
Validator.pattern(String regex,
Validator.PatternFlag... flags)
Build a validator that checks that given value matches a regular expression, and uses
Validator.ValidationMessage.PATTERN as validation error message. |
| Modifier and Type | Method and Description |
|---|---|
Collection<Validator<T>> |
Validator.Validatable.getValidators()
Get the registered validators.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Validator.ValidatorSupport.addValidator(Validator<T> validator)
Adds a validator.
|
void |
Validator.ValidatorSupport.removeValidator(Validator<T> validator)
Removes given
validator, if it was registered. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
BuiltinValidator<T>
A platform builtin
Validator. |
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultValidator<T>
|
| Modifier and Type | Method and Description |
|---|---|
default B |
Property.Builder.validator(Validator<T> validator)
Deprecated.
|
B |
Property.Builder.withValidator(Validator<T> validator)
Add a property value
Validator |
Copyright © 2019 The Holon Platform. All rights reserved.