java.lang.Object
church.i18n.processing.validation.Validator
A validation helper class that creates a fluid interface with construction of processing
messages.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ValidatorBuilderwhen(boolean condition) static <T> @NotNull ValidatorBuilder
-
Method Details
-
when
- Parameters:
condition- When a condition is met, it returns a builder for building processing message. When the condition is false, it creates a no-operation builder and no additional building operation is performed.- Returns:
- A processing message builder when the condition is met; no-operation builder otherwise.
-
when
@NotNull public static <T> @NotNull ValidatorBuilder when(@Nullable T value, @NotNull @NotNull Predicate<T> condition) - Type Parameters:
T- A type of object that is tested.- Parameters:
value- An object that is tested by thecondition.condition- A condition that is evaluated over avalueobject.- Returns:
- A processing message builder when the condition is met; no-operation builder otherwise.
-