public class CommonValidations extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T,C extends Comparable<T>> |
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>> |
isBetween(T min,
T max)
returns a validation which validates that the validated value is between two another values.
|
static <T> Validation<T> |
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> |
isEqualTo(T compareTo)
returns a validation which validates that the validated value is equal to another one.
|
static Validation<Boolean> |
isFalse()
returns a validation which validats that the validated value is false.
|
static <T,C extends Comparable<T>> |
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>> |
isGreaterThan(T compareTo)
returns a validation which validates that the validated value is greater than another one.
|
static <T,C extends Comparable<T>> |
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>> |
isLessThan(T compareTo)
returns a validation which validates that the validated value is less than another one.
|
static <T> Validation<T> |
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> |
isNotEqualTo(T compareTo)
returns a validation which validates that the validated value is NOT equal to another one.
|
static <T> Validation<T> |
isNull()
returns a validation which validates that a value is null.
|
static Validation<Boolean> |
isTrue()
returns a validation which validats that the validated value is true.
|
static <T> Validation<T> |
notNull()
returns a validation which validates that a value is not null.
|
public static <T> Validation<T> notNull()
T - type of the tested valuepublic static <T> Validation<T> isNull()
T - type of the tested valuepublic static <T> Validation<T> isEqualTo(T compareTo)
T - type of the tested valuecompareTo - the validated value is compared to this onepublic static <T> Validation<T> isEqualTo(java.util.function.Supplier<T> compareTo)
T - type of the tested valuecompareTo - the validated value is compared to this onepublic static <T> Validation<T> isNotEqualTo(T compareTo)
T - type of the tested valuecompareTo - the validated value is compared to this onepublic static <T> Validation<T> isNotEqualTo(java.util.function.Supplier<T> compareTo)
T - type of the tested valuecompareTo - the validated value is compared to this onepublic static <T,C extends Comparable<T>> Validation<C> isLessThan(T compareTo)
T - type of the tested valueC - the comparable to TcompareTo - the validated value is compared to this onepublic static <T,C extends Comparable<T>> Validation<C> isLessThan(java.util.function.Supplier<T> compareTo)
T - type of the tested valueC - the comparable to TcompareTo - the validated value is compared to this onepublic static <T,C extends Comparable<T>> Validation<C> isGreaterThan(T compareTo)
T - type of the tested valueC - the comparable to TcompareTo - the validated value is compared to this onepublic static <T,C extends Comparable<T>> Validation<C> isGreaterThan(java.util.function.Supplier<T> compareTo)
T - type of the tested valueC - the comparable to TcompareTo - the validated value is compared to this onepublic static <T,C extends Comparable<T>> Validation<C> isBetween(T min, T max)
T - type of the tested valueC - the comparable to Tmin - the minimum allowed valuemax - the maximum allowed valuepublic static <T,C extends Comparable<T>> Validation<C> isBetween(java.util.function.Supplier<T> min, java.util.function.Supplier<T> max)
T - type of the tested valueC - the comparable to Tmin - the minimum allowed valuemax - the maximum allowed valuepublic static Validation<Boolean> isTrue()
public static Validation<Boolean> isFalse()
Copyright © 2018. All rights reserved.