Class Validation.Builder3<E,T1,T2,T3>

java.lang.Object
io.vavr.control.Validation.Builder3<E,T1,T2,T3>
Type Parameters:
E - type of error
T1 - type of first valid value
T2 - type of second valid value
T3 - type of third valid value
Enclosing interface:
Validation<E,T>

public static final class Validation.Builder3<E,T1,T2,T3> extends Object
A builder that holds three Validation instances, used for combining validations and applying functions that take three arguments.
  • Field Details

  • Constructor Details

  • Method Details

    • ap

      public <R> Validation<Seq<E>,R> ap(Function3<T1,T2,T3,R> f)
      Applies a ternary function to the values of the three validations held by this builder. If all validations are valid, the function is applied. Otherwise, errors are accumulated.
      Type Parameters:
      R - type of the result
      Parameters:
      f - the function to apply
      Returns:
      a Validation with the result or accumulated errors
    • combine

      public <T4> Validation.Builder4<E,T1,T2,T3,T4> combine(Validation<E,T4> v4)
      Combines this builder with another validation, creating a Builder4.
      Type Parameters:
      T4 - type of fourth valid value
      Parameters:
      v4 - the fourth validation
      Returns:
      a new Builder4 instance