Package io.vavr.control
Class Validation.Builder6<E,T1,T2,T3,T4,T5,T6>
- java.lang.Object
-
- io.vavr.control.Validation.Builder6<E,T1,T2,T3,T4,T5,T6>
-
- 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 valueT5- type of fifth valid valueT6- type of sixth valid value
- Enclosing interface:
- Validation<E,T>
public static final class Validation.Builder6<E,T1,T2,T3,T4,T5,T6> extends java.lang.ObjectA builder that holds six Validation instances, used for combining validations and applying functions that take six arguments.
-
-
Field Summary
Fields Modifier and Type Field Description private Validation<E,T1>v1private Validation<E,T2>v2private Validation<E,T3>v3private Validation<E,T4>v4private Validation<E,T5>v5private Validation<E,T6>v6
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder6(Validation<E,T1> v1, Validation<E,T2> v2, Validation<E,T3> v3, Validation<E,T4> v4, Validation<E,T5> v5, Validation<E,T6> v6)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Validation<Seq<E>,R>ap(Function6<T1,T2,T3,T4,T5,T6,R> f)Applies a senary function to the values of the six validations held by this builder.<T7> Validation.Builder7<E,T1,T2,T3,T4,T5,T6,T7>combine(Validation<E,T7> v7)Combines this builder with another validation, creating a Builder7.
-
-
-
Field Detail
-
v1
private Validation<E,T1> v1
-
v2
private Validation<E,T2> v2
-
v3
private Validation<E,T3> v3
-
v4
private Validation<E,T4> v4
-
v5
private Validation<E,T5> v5
-
v6
private Validation<E,T6> v6
-
-
Constructor Detail
-
Builder6
private Builder6(Validation<E,T1> v1, Validation<E,T2> v2, Validation<E,T3> v3, Validation<E,T4> v4, Validation<E,T5> v5, Validation<E,T6> v6)
-
-
Method Detail
-
ap
public <R> Validation<Seq<E>,R> ap(Function6<T1,T2,T3,T4,T5,T6,R> f)
Applies a senary function to the values of the six 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 <T7> Validation.Builder7<E,T1,T2,T3,T4,T5,T6,T7> combine(Validation<E,T7> v7)
Combines this builder with another validation, creating a Builder7.- Type Parameters:
T7- type of seventh valid value- Parameters:
v7- the seventh validation- Returns:
- a new Builder7 instance
-
-