| Modifier and Type | Class and Description |
|---|---|
class |
SimpleValidation<T> |
| Modifier and Type | Method and Description |
|---|---|
default <R> Validation<T> |
Validation.and(java.util.function.Function<T,R> mapper,
Validation<R> other) |
default Validation<T> |
Validation.and(Validation<T> other) |
default Validation<T> |
Validation.or(Validation<T> other) |
| Modifier and Type | Method and Description |
|---|---|
default <R> Validation<T> |
Validation.and(java.util.function.Function<T,R> mapper,
Validation<R> other) |
default Validation<T> |
Validation.and(Validation<T> other) |
default Validation<T> |
Validation.or(Validation<T> other) |
| Modifier and Type | Method and Description |
|---|---|
static <T,C extends Comparable<T>> |
CommonValidations.isBetween(java.util.function.Supplier<T> min,
java.util.function.Supplier<T> max)
returns a validation which validates that the validated value is between two another values.
|
static <T,C extends Comparable<T>> |
CommonValidationsWithErrorCode.isBetween(java.util.function.Supplier<T> min,
java.util.function.Supplier<T> max,
String errorCode)
returns a validation which validates that the validated value is between two another values.
|
static <T,C extends Comparable<T>> |
CommonValidations.isBetween(T min,
T max)
returns a validation which validates that the validated value is between two another values.
|
static <T,C extends Comparable<T>> |
CommonValidationsWithErrorCode.isBetween(T min,
T max,
String errorCode)
returns a validation which validates that the validated value is between two another values.
|
static <T> Validation<T> |
CommonValidations.isEqualTo(java.util.function.Supplier<T> compareTo)
returns a validation which validates that the validated value is equal to another one.
|
static <T> Validation<T> |
CommonValidationsWithErrorCode.isEqualTo(java.util.function.Supplier<T> compareTo,
String errorCode)
returns a validation which validates that the validated value is equal to another one.
|
static <T> Validation<T> |
CommonValidations.isEqualTo(T compareTo)
returns a validation which validates that the validated value is equal to another one.
|
static <T> Validation<T> |
CommonValidationsWithErrorCode.isEqualTo(T compareTo,
String errorCode)
returns a validation which validates that the validated value is equal to another one.
|
static <T,C extends Comparable<T>> |
CommonValidations.isGreaterThan(java.util.function.Supplier<T> compareTo)
returns a validation which validates that the validated value is greater than another one.
|
static <T,C extends Comparable<T>> |
CommonValidationsWithErrorCode.isGreaterThan(java.util.function.Supplier<T> compareTo,
String errorCode)
returns a validation which validates that the validated value is greater than another one.
|
static <T,C extends Comparable<T>> |
CommonValidations.isGreaterThan(T compareTo)
returns a validation which validates that the validated value is greater than another one.
|
static <T,C extends Comparable<T>> |
CommonValidationsWithErrorCode.isGreaterThan(T compareTo,
String errorCode)
returns a validation which validates that the validated value is greater than another one.
|
static <T,C extends Comparable<T>> |
CommonValidations.isLessThan(java.util.function.Supplier<T> compareTo)
returns a validation which validates that the validated value is less than another one.
|
static <T,C extends Comparable<T>> |
CommonValidationsWithErrorCode.isLessThan(java.util.function.Supplier<T> compareTo,
String errorCode)
returns a validation which validates that the validated value is less than another one.
|
static <T,C extends Comparable<T>> |
CommonValidations.isLessThan(T compareTo)
returns a validation which validates that the validated value is less than another one.
|
static <T,C extends Comparable<T>> |
CommonValidationsWithErrorCode.isLessThan(T compareTo,
String errorCode)
returns a validation which validates that the validated value is less than another one.
|
static <T> Validation<T> |
CommonValidations.isNotEqualTo(java.util.function.Supplier<T> compareTo)
returns a validation which validates that the validated value is NOT equal to another one.
|
static <T> Validation<T> |
CommonValidationsWithErrorCode.isNotEqualTo(java.util.function.Supplier<T> compareTo,
String errorCode)
returns a validation which validates that the validated value is NOT equal to another one.
|
static <T> Validation<T> |
CommonValidations.isNotEqualTo(T compareTo)
returns a validation which validates that the validated value is NOT equal to another one.
|
static <T> Validation<T> |
CommonValidationsWithErrorCode.isNotEqualTo(T compareTo,
String errorCode)
returns a validation which validates that the validated value is NOT equal to another one.
|
static <T> Validation<T> |
CommonValidations.notNull()
returns a validation which validates that a value is not null.
|
static <T> Validation<T> |
CommonValidationsWithErrorCode.notNull(String errorCode)
returns a validation which validates that a value is not null.
|
| Modifier and Type | Method and Description |
|---|---|
static Validation<java.time.LocalDateTime> |
DateValidations.isDateAfter(java.time.LocalDateTime minDate)
validates if the validated date is after the date provided by the argument minDate.
|
static Validation<java.time.LocalDateTime> |
DateValidationsWithErrorCode.isDateAfter(java.time.LocalDateTime minDate,
String errorCode)
validates if the validated date is after the date provided by the argument minDate.
|
static Validation<java.time.LocalDateTime> |
DateValidations.isDateAfter(java.util.function.Supplier<java.time.LocalDateTime> minDateSupplier)
validates if the validated date is after the date provided by the argument minDateSupplier.
|
static Validation<java.time.LocalDateTime> |
DateValidationsWithErrorCode.isDateAfter(java.util.function.Supplier<java.time.LocalDateTime> minDateSupplier,
String errorCode)
validates if the validated date is after the date provided by the argument minDateSupplier.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleListValidation<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> Validation<List<T>> |
ListValidations.contains(java.util.function.Supplier<T> containedValue)
validates that a list contains at least one entry which matches to the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.contains(java.util.function.Supplier<T> containedValue,
String errorCode)
validates that a list contains at least one entry which matches to the provided arg.
|
static <T> Validation<List<T>> |
ListValidations.contains(T containedValue)
validates that a list contains at least one entry which matches to the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.contains(T containedValue,
String errorCode)
validates that a list contains at least one entry which matches to the provided arg.
|
static <T> Validation<List<T>> |
ListValidations.containsOnly(java.util.function.Supplier<T> containedValue)
validates that a list contains only entries which match to the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.containsOnly(java.util.function.Supplier<T> containedValue,
String errorCode)
validates that a list contains only entries which match to the provided arg.
|
static <T> Validation<List<T>> |
ListValidations.containsOnly(T containedValue)
validates that a list contains only entries which match to the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.containsOnly(T containedValue,
String errorCode)
validates that a list contains only entries which match to the provided arg.
|
static <T> Validation<List<T>> |
ListValidations.doesNotContain(java.util.function.Supplier<T> excludedValue)
validates that a list does not contain an entry which matches the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.doesNotContain(java.util.function.Supplier<T> excludedValue,
String errorCode)
validates that a list does not contain an entry which matches the provided arg.
|
static <T> Validation<List<T>> |
ListValidations.doesNotContain(T excludedValue)
validates that a list does not contain an entry which matches the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.doesNotContain(T excludedValue,
String errorCode)
validates that a list does not contain an entry which matches the provided arg.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.forType(Class<T> listType,
Validation<List<T>> validation)
sadly this method is needed if you want to start with general validations on lists, like the notEmpty, and
afterwards the entries should be validated by a property.
|
static <T> Validation<List<T>> |
ListValidations.forType(Class<T> listType,
Validation<List<T>> validation)
sadly this method is needed if you want to start with general validations on lists, like the notEmpty, and
afterwards the entries should be validated by a property.
|
static <T> Validation<List<T>> |
ListValidations.hasMaxSize(int size)
validates that a list has an expected maximum size.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.hasMaxSize(int size,
String errorCode)
validates that a list has an expected maximum size.
|
static <T> Validation<List<T>> |
ListValidations.hasMaxSize(java.util.function.Supplier<Integer> size)
validates that a list has an expected maximum size.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.hasMaxSize(java.util.function.Supplier<Integer> size,
String errorCode)
validates that a list has an expected maximum size.
|
static <T> Validation<List<T>> |
ListValidations.hasMinSize(int size)
validates that a list has an expected minimum size.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.hasMinSize(int size,
String errorCode)
validates that a list has an expected minimum size.
|
static <T> Validation<List<T>> |
ListValidations.hasMinSize(java.util.function.Supplier<Integer> size)
validates that a list has an expected minimum size.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.hasMinSize(java.util.function.Supplier<Integer> size,
String errorCode)
validates that a list has an expected minimum size.
|
static <T> Validation<List<T>> |
ListValidations.hasSize(int size)
validates that a list has an expected size.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.hasSize(int size,
String errorCode)
validates that a list has an expected size.
|
static <T> Validation<List<T>> |
ListValidations.hasSize(java.util.function.Supplier<Integer> size)
validates that a list has an expected size.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.hasSize(java.util.function.Supplier<Integer> size,
String errorCode)
validates that a list has an expected size.
|
static <T> Validation<List<T>> |
ListValidations.isEmpty()
validates that a list is empty.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.isEmpty(String errorCode)
validates that a list is empty.
|
static <T> Validation<List<T>> |
ListValidations.isNotEmpty()
validates that a list isn't empty.
|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.isNotEmpty(String errorCode)
validates that a list isn't empty.
|
static <T,E> Validation<List<T>> |
ListValidationsWithErrorCode.onProperty(java.util.function.Function<T,E> function,
Validation<List<E>> validation)
validation for a property of the list entries.
|
static <T,E> Validation<List<T>> |
ListValidations.onProperty(java.util.function.Function<T,E> function,
Validation<List<E>> validation)
validation for a property of the list entries.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Validation<List<T>> |
ListValidationsWithErrorCode.forType(Class<T> listType,
Validation<List<T>> validation)
sadly this method is needed if you want to start with general validations on lists, like the notEmpty, and
afterwards the entries should be validated by a property.
|
static <T> Validation<List<T>> |
ListValidations.forType(Class<T> listType,
Validation<List<T>> validation)
sadly this method is needed if you want to start with general validations on lists, like the notEmpty, and
afterwards the entries should be validated by a property.
|
static <T,E> Validation<List<T>> |
ListValidationsWithErrorCode.onProperty(java.util.function.Function<T,E> function,
Validation<List<E>> validation)
validation for a property of the list entries.
|
static <T,E> Validation<List<T>> |
ListValidations.onProperty(java.util.function.Function<T,E> function,
Validation<List<E>> validation)
validation for a property of the list entries.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends Number> |
NumberValidations.isByte()
provides a validation which validates if a values matches to a byte.
|
<T extends Number> |
CoreNumberValidations.isByte(ErrorDescription errorDescription) |
static <T extends Number> |
NumberValidationsWithErrorCode.isByte(String errorCode)
provides a validation which validates if a values matches to a byte.
|
static <T extends Number> |
NumberValidations.isInt()
provides a validation which validates if a values matches to an integer.
|
<T extends Number> |
CoreNumberValidations.isInt(ErrorDescription errorDescription) |
static <T extends Number> |
NumberValidationsWithErrorCode.isInt(String errorCode)
provides a validation which validates if a values matches to an integer.
|
static <T extends Number> |
NumberValidations.isShort()
provides a validation which validates if a values matches to a short.
|
<T extends Number> |
CoreNumberValidations.isShort(ErrorDescription errorDescription) |
static <T extends Number> |
NumberValidationsWithErrorCode.isShort(String errorCode)
provides a validation which validates if a values matches to a short.
|
| Modifier and Type | Method and Description |
|---|---|
static Validation<String> |
StringValidations.contains(String contained)
creates a validation which validates if a string contains an expected text.
|
static Validation<String> |
StringValidationsWithErrorCode.contains(String contained,
String errorCode)
creates a validation which validates if a string contains an expected text.
|
static Validation<String> |
StringValidations.contains(java.util.function.Supplier<String> contained)
creates a validation which validates if a string contains an expected text.
|
static Validation<String> |
StringValidationsWithErrorCode.contains(java.util.function.Supplier<String> contained,
String errorCode)
creates a validation which validates if a string contains an expected text.
|
static Validation<String> |
StringValidations.containsNotOnly(String containedValue)
creates a validation which validates if a string contains not only an expected text.
|
static Validation<String> |
StringValidationsWithErrorCode.containsNotOnly(String containedValue,
String errorCode)
creates a validation which validates if a string contains not only an expected text.
|
static Validation<String> |
StringValidations.containsNotOnly(java.util.function.Supplier<String> containedValue)
creates a validation which validates if a string contains not only an expected text.
|
static Validation<String> |
StringValidationsWithErrorCode.containsNotOnly(java.util.function.Supplier<String> containedValue,
String errorCode)
creates a validation which validates if a string contains not only an expected text.
|
static Validation<String> |
StringValidations.hasLength(int length)
creates a validation which validates if a string length is equal to the provided size length argument.
|
static Validation<String> |
StringValidationsWithErrorCode.hasLength(int length,
String errorCode)
creates a validation which validates if a string length is equal to the provided size length argument.
|
static Validation<String> |
StringValidations.hasLength(java.util.function.Supplier<Integer> length)
creates a validation which validates if a string length is equal to the provided size length argument.
|
static Validation<String> |
StringValidationsWithErrorCode.hasLength(java.util.function.Supplier<Integer> length,
String errorCode)
creates a validation which validates if a string length is equal to the provided size length argument.
|
static Validation<String> |
StringValidations.isDate(java.time.format.DateTimeFormatter formatter)
creates a validation which validates that a string can be parsed to a date.
|
static Validation<String> |
StringValidationsWithErrorCode.isDate(java.time.format.DateTimeFormatter formatter,
String errorCode)
creates a validation which validates that a string can be parsed to a date.
|
static Validation<String> |
StringValidations.isDate(java.util.function.Supplier<java.time.format.DateTimeFormatter> formatter)
creates a validation which validates that a string can be parsed to a date.
|
static Validation<String> |
StringValidationsWithErrorCode.isDate(java.util.function.Supplier<java.time.format.DateTimeFormatter> formatter,
String errorCode)
creates a validation which validates that a string can be parsed to a date.
|
static Validation<String> |
StringValidations.isInArray(java.util.function.Supplier<String[]> validValueSupplier)
creates a validation which validates that a string is in a list of valid values.
|
static Validation<String> |
StringValidationsWithErrorCode.isInArray(java.util.function.Supplier<String[]> validValueSupplier,
String errorCode)
creates a validation which validates that a string is in a list of valid values.
|
static Validation<String> |
StringValidations.isInList(java.util.function.Supplier<Collection<String>> validValueSupplier)
creates a validation which validates that a string is in a list of valid values
|
static Validation<String> |
StringValidationsWithErrorCode.isInList(java.util.function.Supplier<Collection<String>> validValueSupplier,
String errorCode)
creates a validation which validates that a string is in a list of valid values
|
static Validation<String> |
StringValidations.isNotBlank()
creates a validation which validates that a string is not blank(see StringUtils of apache commons)
|
static Validation<String> |
StringValidationsWithErrorCode.isNotBlank(String errorCode)
creates a validation which validates that a string is not blank(see StringUtils of apache commons)
|
static Validation<String> |
StringValidations.isNumeric()
creates a validation which validates if a string is numeric.
|
static Validation<String> |
StringValidationsWithErrorCode.isNumeric(String errorCode)
creates a validation which validates if a string is numeric.
|
static Validation<String> |
StringValidations.lengthIsBetween(int minSize,
int maxSize)
creates a validation which validates if a string length is between the provided size arguments.
|
static Validation<String> |
StringValidationsWithErrorCode.lengthIsBetween(int minSize,
int maxSize,
String minSizeErrorCode,
String maxSizeErrorCode)
creates a validation which validates if a string length is between the provided size arguments.
|
static Validation<String> |
StringValidations.lengthIsBetween(java.util.function.Supplier<Integer> minSize,
java.util.function.Supplier<Integer> maxSize)
creates a validation which validates if a string length is between the provided size arguments.
|
static Validation<String> |
StringValidationsWithErrorCode.lengthIsBetween(java.util.function.Supplier<Integer> minSize,
java.util.function.Supplier<Integer> maxSize,
String minSizeErrorCode,
String maxSizeErrorCode)
creates a validation which validates if a string length is between the provided size arguments.
|
static Validation<String> |
StringValidations.lengthIsLessThan(int size)
creates a validation which validates that a string length is less than the provided size argument.
|
static Validation<String> |
StringValidationsWithErrorCode.lengthIsLessThan(int size,
String errorCode)
creates a validation which validates that a string length is less than the provided size argument.
|
static Validation<String> |
StringValidations.lengthIsLessThan(java.util.function.Supplier<Integer> size)
creates a validation which validates that a string length is less than the provided size argument.
|
static Validation<String> |
StringValidationsWithErrorCode.lengthIsLessThan(java.util.function.Supplier<Integer> size,
String errorCode)
creates a validation which validates that a string length is less than the provided size argument.
|
static Validation<String> |
StringValidations.lengthIsMoreThan(int size)
create a validation which validates that a string has a length more than the provided size argument.
|
static Validation<String> |
StringValidationsWithErrorCode.lengthIsMoreThan(int size,
String errorCode)
create a validation which validates that a string has a length more than the provided size argument.
|
static Validation<String> |
StringValidations.lengthIsMoreThan(java.util.function.Supplier<Integer> size)
create a validation which validates that a string has a length more than the provided size argument.
|
static Validation<String> |
StringValidationsWithErrorCode.lengthIsMoreThan(java.util.function.Supplier<Integer> size,
String errorCode)
create a validation which validates that a string has a length more than the provided size argument.
|
Copyright © 2018. All rights reserved.