-
- All Implemented Interfaces:
public class Validator<T extends Object> extends BaseValidator<T>
-
-
Method Summary
Modifier and Type Method Description final NullableValidator<T>
allowNullable()
final Validator<T>
check(Function1<T, Boolean> check, String error)
final Validator<T>
check(Function1<T, Boolean> check, ValidationError<T> error)
final Boolean
hasValue()
T
get()
final T
getOrDefault(T default)
T
getOrThrow(Function1<Map<String, List<ValidationError<Object>>>, Exception> exceptionFunction)
-
-
Method Detail
-
allowNullable
final NullableValidator<T> allowNullable()
-
getOrDefault
final T getOrDefault(T default)
-
getOrThrow
@NotNull() T getOrThrow(Function1<Map<String, List<ValidationError<Object>>>, Exception> exceptionFunction)
-
-
-
-