java.lang.Object
church.i18n.processing.validation.Validator

public class Validator extends Object
A validation helper class that creates a fluid interface with construction of processing messages.
  • Method Details

    • when

      @NotNull public static @NotNull ValidatorBuilder when(boolean condition)
      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 the condition.
      condition - A condition that is evaluated over a value object.
      Returns:
      A processing message builder when the condition is met; no-operation builder otherwise.