public class CommonValidationsWithErrorCode extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Validation<T> |
isEqualTo(java.util.function.Supplier<T> compareTo,
String errorCode)
returns a validation which validates that the validated value is equal to anotherone.
|
static <T> Validation<T> |
isEqualTo(T compareTo,
String errorCode)
returns a validation which validates that the validated value is equal to anotherone.
|
static <T> Validation<T> |
notNull(String errorCode)
returns a validation which validates that a value is not null.
|
public static <T> Validation<T> notNull(String errorCode)
T - type of the tested valueerrorCode - in the case the validation violates this code is reported in the resultpublic static <T> Validation<T> isEqualTo(T compareTo, String errorCode)
T - type of the tested valuecompareTo - the validated value is compared to this oneerrorCode - in the case the validation violates this code is reported in the resultpublic static <T> Validation<T> isEqualTo(java.util.function.Supplier<T> compareTo, String errorCode)
T - type of the tested valuecompareTo - the validated value is compared to this oneerrorCode - in the case the validation violates this code is reported in the resultCopyright © 2018. All rights reserved.