Class Validation.Builder4<E,T1,T2,T3,T4>
java.lang.Object
io.vavr.control.Validation.Builder4<E,T1,T2,T3,T4>
- Type Parameters:
E- type of errorT1- type of first valid valueT2- type of second valid valueT3- type of third valid valueT4- type of fourth valid value
- Enclosing interface:
Validation<E,T>
A builder that holds four Validation instances, used for combining validations
and applying functions that take four arguments.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Validation<E, T1> private Validation<E, T2> private Validation<E, T3> private Validation<E, T4> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBuilder4(Validation<E, T1> v1, Validation<E, T2> v2, Validation<E, T3> v3, Validation<E, T4> v4) -
Method Summary
Modifier and TypeMethodDescription<R> Validation<Seq<E>, R> Applies a quaternary function to the values of the four validations held by this builder.combine(Validation<E, T5> v5) Combines this builder with another validation, creating a Builder5.
-
Field Details
-
v1
-
v2
-
v3
-
v4
-
-
Constructor Details
-
Builder4
private Builder4(Validation<E, T1> v1, Validation<E, T2> v2, Validation<E, T3> v3, Validation<E, T4> v4)
-
-
Method Details
-
ap
Applies a quaternary function to the values of the four 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
Combines this builder with another validation, creating a Builder5.- Type Parameters:
T5- type of fifth valid value- Parameters:
v5- the fifth validation- Returns:
- a new Builder5 instance
-