Class Validation<T,E>

java.lang.Object
com.github.skopylov58.functional.Validation<T,E>
Type Parameters:
T - type to validate
E - type of validation error

@Deprecated public class Validation<T,E> extends Object
Deprecated.
Use Validator instead.
Simple functional validator collecting all validation errors.
  • Method Details

    • validate

      public List<E> validate(T t)
      Deprecated.
      Validates data.
      Parameters:
      t - data to validate, null data will not be validated.
      Returns:
      list of validation errors, empty list if there are not any errors.
    • validateToEither

      public Either<List<E>,T> validateToEither(T t)
      Deprecated.
      Validates data
      Parameters:
      t - data to validate
      Returns:
      Either
    • builder

      public static <T, E> Validation.Builder<T,E> builder()
      Deprecated.
      Creates validation builder.
      Type Parameters:
      T - type to validate
      E - validation error type
      Returns:
      validation builder