Class Validation.Builder5<E,​T1,​T2,​T3,​T4,​T5>

  • Type Parameters:
    E - type of error
    T1 - type of first valid value
    T2 - type of second valid value
    T3 - type of third valid value
    T4 - type of fourth valid value
    T5 - type of fifth valid value
    Enclosing interface:
    Validation<E,​T>

    public static final class Validation.Builder5<E,​T1,​T2,​T3,​T4,​T5>
    extends java.lang.Object
    A builder that holds five Validation instances, used for combining validations and applying functions that take five arguments.
    • Method Detail

      • ap

        public <R> Validation<Seq<E>,​R> ap​(Function5<T1,​T2,​T3,​T4,​T5,​R> f)
        Applies a quinary function to the values of the five 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 <T6> Validation.Builder6<E,​T1,​T2,​T3,​T4,​T5,​T6> combine​(Validation<E,​T6> v6)
        Combines this builder with another validation, creating a Builder6.
        Type Parameters:
        T6 - type of sixth valid value
        Parameters:
        v6 - the sixth validation
        Returns:
        a new Builder6 instance