Uses of Class
fj.data.Validation
-
Packages that use Validation Package Description fj Types that set the premise for the existence of Functional Java.fj.data Common algebraic data types.fj.data.optic Optic data types adapted from the Scala Monocle library and inspired by the Haskell Lens library.fj.function A prelude of commonly used first-class functionsfj.parser Parser combinators. -
-
Uses of Validation in fj
Methods in fj that return Validation Modifier and Type Method Description <B,E>
Validation<E,P1<B>>P1. traverseValidation(F<A,Validation<E,B>> f)
Traversable instance of P1 for ValidationMethods in fj that return types with arguments of type Validation Modifier and Type Method Description static <A,E extends java.lang.Exception>
P1<Validation<E,A>>Try. f(Try0<A,E> t)
Promotes the Try0 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,E extends java.lang.Exception>
F<A,Validation<E,B>>Try. f(Try1<A,B,E> t)
Promotes the Try1 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,E extends java.lang.Exception>
F2<A,B,Validation<E,C>>Try. f(Try2<A,B,C,E> t)
Promotes the Try2 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,D,E extends java.lang.Exception>
F3<A,B,C,Validation<E,D>>Try. f(Try3<A,B,C,D,E> t)
Promotes the Try3 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,D,E,Z extends java.lang.Exception>
F4<A,B,C,D,Validation<Z,E>>Try. f(Try4<A,B,C,D,E,Z> t)
Promotes the Try4 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,D,E,F,Z extends java.lang.Exception>
F5<A,B,C,D,E,Validation<Z,F>>Try. f(Try5<A,B,C,D,E,F,Z> t)
Promotes the Try5 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,D,E,F,G,Z extends java.lang.Exception>
F6<A,B,C,D,E,F,Validation<Z,G>>Try. f(Try6<A,B,C,D,E,F,G,Z> t)
Promotes the Try6 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,D,E,F,G,H,Z extends java.lang.Exception>
F7<A,B,C,D,E,F,G,Validation<Z,H>>Try. f(Try7<A,B,C,D,E,F,G,H,Z> t)
Promotes the Try7 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,B,C,D,E,F,G,H,I,Z extends java.lang.Exception>
F8<A,B,C,D,E,F,G,H,Validation<Z,I>>Try. f(Try8<A,B,C,D,E,F,G,H,I,Z> t)
Promotes the Try8 to a Validation that returns an Exception on the failure side and its result on the success side.static <A,Z extends java.lang.Exception>
P1<Validation<Z,Unit>>TryEffect. f(TryEffect0<Z> t)
static <A,Z extends java.lang.Exception>
F<A,Validation<Z,Unit>>TryEffect. f(TryEffect1<A,Z> t)
static <A,B,Z extends java.lang.Exception>
F2<A,B,Validation<Z,Unit>>TryEffect. f(TryEffect2<A,B,Z> t)
static <A,B,C,Z extends java.lang.Exception>
F3<A,B,C,Validation<Z,Unit>>TryEffect. f(TryEffect3<A,B,C,Z> t)
static <A,B,C,D,Z extends java.lang.Exception>
F4<A,B,C,D,Validation<Z,Unit>>TryEffect. f(TryEffect4<A,B,C,D,Z> t)
static <A,B,C,D,E,Z extends java.lang.Exception>
F5<A,B,C,D,E,Validation<Z,Unit>>TryEffect. f(TryEffect5<A,B,C,D,E,Z> t)
static <A,B,C,D,E,$F,Z extends java.lang.Exception>
F6<A,B,C,D,E,$F,Validation<Z,Unit>>TryEffect. f(TryEffect6<A,B,C,D,E,$F,Z> t)
static <A,B,C,D,E,$F,G,Z extends java.lang.Exception>
F7<A,B,C,D,E,$F,G,Validation<Z,Unit>>TryEffect. f(TryEffect7<A,B,C,D,E,$F,G,Z> t)
static <A,B,C,D,E,$F,G,H,Z extends java.lang.Exception>
F8<A,B,C,D,E,$F,G,H,Validation<Z,Unit>>TryEffect. f(TryEffect8<A,B,C,D,E,$F,G,H,Z> t)
default <C> F<A,Validation<B,C>>
F. failK()
Promotes this function so that it returns its result on the failure side of a Validation.default <X> F<Validation<A,X>,Validation<B,X>>
F. mapFail()
Promotes this function to map over the failure side of a Validation.default <X> F<Validation<A,X>,Validation<B,X>>
F. mapFail()
Promotes this function to map over the failure side of a Validation.default <X> F<Validation<X,A>,Validation<X,B>>
F. mapSuccess()
Promotes this function to map over the success side of a Validation.default <X> F<Validation<X,A>,Validation<X,B>>
F. mapSuccess()
Promotes this function to map over the success side of a Validation.default F<Validation<B,A>,B>
F. onFail()
Returns a function that returns the failure side of a given Validation, or this function applied to the success side.default F<Validation<A,B>,B>
F. onSuccess()
Returns a function that returns the success side of a given Validation, or this function applied to the failure side.default <C> F<A,Validation<C,B>>
F. successK()
Promotes this function so that it returns its result on the success side of an Validation.static <A,B>
Equal<Validation<A,B>>Equal. validationEqual(Equal<A> ea, Equal<B> eb)
An equal instance for theValidation
type.static <A,B>
Hash<Validation<A,B>>Hash. validationHash(Hash<A> ha, Hash<B> hb)
A hash instance for theValidation
type.static <A,B>
Ord<Validation<A,B>>Ord. validationOrd(Ord<A> oa, Ord<B> ob)
An order instance for theValidation
type.static <A,B>
Show<Validation<A,B>>Show. validationShow(Show<A> sa, Show<B> sb)
A show instance for theValidation
type.Method parameters in fj with type arguments of type Validation Modifier and Type Method Description <B,E>
Validation<E,P1<B>>P1. traverseValidation(F<A,Validation<E,B>> f)
Traversable instance of P1 for Validation -
Uses of Validation in fj.data
Fields in fj.data declared as Validation Modifier and Type Field Description private Validation<E,T>
Validation.FailProjection. v
Fields in fj.data with type parameters of type Validation Modifier and Type Field Description static F<java.lang.String,Validation<java.lang.NumberFormatException,java.lang.Byte>>
Validation. parseByte
A function that parses a string into a byte.static F<java.lang.String,Validation<java.lang.NumberFormatException,java.lang.Double>>
Validation. parseDouble
A function that parses a string into a double.static F<java.lang.String,Validation<java.lang.NumberFormatException,java.lang.Float>>
Validation. parseFloat
A function that parses a string into a float.static F<java.lang.String,Validation<java.lang.NumberFormatException,java.lang.Integer>>
Validation. parseInt
A function that parses a string into an integer.static F<java.lang.String,Validation<java.lang.NumberFormatException,java.lang.Long>>
Validation. parseLong
A function that parses a string into a long.static F<java.lang.String,Validation<java.lang.NumberFormatException,java.lang.Short>>
Validation. parseShort
A function that parses a string into a short.Methods in fj.data that return Validation Modifier and Type Method Description <A> Validation<E,A>
Validation. accumapply(Semigroup<E> s, Validation<E,F<T,A>> v)
Function application on the successful side of this validation, or accumulating the errors on the failing side using the given semigroup should one or more be encountered.Validation<List<E>,T>
Validation. accumulate()
<B,C,D,$E,$F,G,H,I>
Validation<List<E>,I>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, Validation<E,$F> v6, Validation<E,G> v7, Validation<E,H> v8, F8<T,B,C,D,$E,$F,G,H,I> f)
<B,C,D,$E,$F,G,H>
Validation<List<E>,H>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, Validation<E,$F> v6, Validation<E,G> v7, F7<T,B,C,D,$E,$F,G,H> f)
<B,C,D,$E,$F,G>
Validation<List<E>,G>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, Validation<E,$F> v6, F6<T,B,C,D,$E,$F,G> f)
<B,C,D,$E,$F>
Validation<List<E>,$F>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, F5<T,B,C,D,$E,$F> f)
<B,C,D,$E>
Validation<List<E>,$E>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, F4<T,B,C,D,$E> f)
<B,C,D>
Validation<List<E>,D>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, F3<T,B,C,D> f)
<B,C>
Validation<List<E>,C>Validation. accumulate(Validation<E,B> v2, F2<T,B,C> f)
<B> Validation<List<E>,B>
Validation. accumulate(F<T,B> f)
<A,B,C,D,E$,F$,G,H>
Validation<E,H>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, Validation<E,G> vg, F<T,F<A,F<B,F<C,F<D,F<E$,F<F$,F<G,H>>>>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$,G,H>
Validation<E,H>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, Validation<E,G> vg, F8<T,A,B,C,D,E$,F$,G,H> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$,G>
Validation<E,G>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, F<T,F<A,F<B,F<C,F<D,F<E$,F<F$,G>>>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$,G>
Validation<E,G>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, F7<T,A,B,C,D,E$,F$,G> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$>
Validation<E,F$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, F<T,F<A,F<B,F<C,F<D,F<E$,F$>>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$>
Validation<E,F$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, F6<T,A,B,C,D,E$,F$> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$>
Validation<E,E$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, F<T,F<A,F<B,F<C,F<D,E$>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$>
Validation<E,E$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, F5<T,A,B,C,D,E$> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D>
Validation<E,D>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, F<T,F<A,F<B,F<C,D>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D>
Validation<E,D>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, F4<T,A,B,C,D> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C>
Validation<E,C>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, F<T,F<A,F<B,C>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C>
Validation<E,C>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, F3<T,A,B,C> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B>
Validation<E,B>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, F<T,F<A,B>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B>
Validation<E,B>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, F2<T,A,B> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A> Validation<E,A>
Validation. apply(Validation<E,F<T,A>> v)
Function application on the success value.<A> Validation<A,T>
Validation.FailProjection. apply(Validation<F<E,A>,T> v)
Function application on the failing value.<A> Validation<E,A>
Validation. bind(F<T,Validation<E,A>> f)
Binds the given function across this validation's success value if it has one.<A> Validation<A,T>
Validation.FailProjection. bind(F<E,Validation<A,T>> f)
Binds the given function across this validation's failing value if it has one.static <E,T>
Validation<E,T>Validation. condition(boolean c, E e, T t)
Returns a validation based on a boolean condition.static <E,T>
Validation<E,T>Validation. fail(E e)
Returns a failing validation containing the given value.static <E,T>
Validation<NonEmptyList<E>,T>Validation. failNEL(E e)
Returns a failing validation containing a non-empty list that contains the given value.<A> Validation<A,T>
Validation.FailProjection. map(F<E,A> f)
Maps the given function across the failing side of this validation.<A> Validation<E,A>
Validation. map(F<T,A> f)
Maps the given function across the success side of this validation.Validation<NonEmptyList<E>,T>
Validation. nel()
Puts this validation's failing value in a non-empty list if there is one.static Validation<java.lang.NumberFormatException,java.lang.Byte>
Validation. parseByte(java.lang.String s)
Parses the given string into a byte.static Validation<java.lang.NumberFormatException,java.lang.Double>
Validation. parseDouble(java.lang.String s)
Parses the given string into a double.static Validation<java.lang.NumberFormatException,java.lang.Float>
Validation. parseFloat(java.lang.String s)
Parses the given string into a float.static Validation<java.lang.NumberFormatException,java.lang.Integer>
Validation. parseInt(java.lang.String s)
Parses the given string into a integer.static Validation<java.lang.NumberFormatException,java.lang.Long>
Validation. parseLong(java.lang.String s)
Parses the given string into a long.static Validation<java.lang.NumberFormatException,java.lang.Short>
Validation. parseShort(java.lang.String s)
Parses the given string into a short.<A> Validation<A,T>
Validation.FailProjection. sequence(Validation<A,T> v)
Performs a bind across the validation, but ignores the element value in the function.<A> Validation<E,A>
Validation. sequence(Validation<E,A> v)
Anonymous bind through this validation.static <E,A>
Validation<E,List<A>>Validation. sequence(Semigroup<E> s, List<Validation<E,A>> list)
If list contains a failure, returns a failure of the reduction of all the failures using the semigroup, otherwise returns the successful list.static <A,E>
Validation<List<E>,List<A>>Validation. sequenceNonCumulative(List<Validation<E,A>> list)
If the list contains a failure, returns a Validation of the list of fails in the list, otherwise returns a successful Validation with the list of successful values.static <E,B>
Validation<E,List<B>>List. sequenceValidation(Semigroup<E> semigroup, List<Validation<E,B>> list)
Sequence the given list and collect the output as a validation; use the given semigroup to reduce the errors.static <E,B>
Validation<E,Option<B>>Option. sequenceValidation(Option<Validation<E,B>> option)
Sequence the given option and collect the output as a validation.static <E,B>
Validation<E,Seq<B>>Seq. sequenceValidation(Seq<Validation<E,B>> seq)
Sequence the given seq and collect the output as a validation.static <E,B>
Validation<E,Seq<B>>Seq. sequenceValidation(Semigroup<E> semigroup, Seq<Validation<E,B>> seq)
Sequence the given seq and collect the output as a validation; use the given semigroup to reduce the errors.static <E,B>
Validation<E,Stream<B>>Stream. sequenceValidation(Stream<Validation<E,B>> stream)
Sequence the given stream and collect the output as a validation.static <E,B>
Validation<E,Stream<B>>Stream. sequenceValidation(Semigroup<E> semigroup, Stream<Validation<E,B>> stream)
Sequence the given stream and collect the output as a validation; use the given semigroup to reduce the errors.static <E,E1,C>
Validation<E1,Validation<E,C>>Validation. sequenceValidation(Validation<E,Validation<E1,C>> validation)
Sequence the given validation and collect the output as a validation.static <E,T>
Validation<E,T>Validation. success(T t)
Returns a succeeding validation containing the given value.<X> Validation<X,A>
Option. toValidation(X x)
<E,B>
Validation<E,List<B>>List. traverseValidation(Semigroup<E> s, F<A,Validation<E,B>> f)
Traverse this list with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E,B>
Validation<E,Option<B>>Option. traverseValidation(F<A,Validation<E,B>> f)
Traverse this option with the given function and collect the output as a validation.<E,B>
Validation<E,Seq<B>>Seq. traverseValidation(F<A,Validation<E,B>> f)
Traverse this seq with the given function and collect the output as a validation.<E,B>
Validation<E,Seq<B>>Seq. traverseValidation(Semigroup<E> semigroup, F<A,Validation<E,B>> f)
Traverse this seq with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E,B>
Validation<E,Stream<B>>Stream. traverseValidation(F<A,Validation<E,B>> f)
Traverse this stream with the given function and collect the output as a validation.<E,B>
Validation<E,Stream<B>>Stream. traverseValidation(Semigroup<E> semigroup, F<A,Validation<E,B>> f)
Traverse this stream with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E1,C>
Validation<E1,Validation<E,C>>Validation. traverseValidation(F<T,Validation<E1,C>> f)
Traverse this validation with the given function and collect the output as a validation.Validation<E,T>
Validation.FailProjection. validation()
Returns the underlying validation.static <E,T>
Validation<E,T>Validation. validation(Either<E,T> e)
Construct a validation using the given either value.Methods in fj.data that return types with arguments of type Validation Modifier and Type Method Description static <E,T>
F<Validation<E,T>,Either<E,T>>Validation. either()
Returns a function that constructs an either with a validation.<A> Option<Validation<E,A>>
Validation.FailProjection. filter(F<E,java.lang.Boolean> f)
ReturnsNone
if this is a success or if the given predicatep
does not hold for the failing value, otherwise, returns a fail inSome
.<A> Option<Validation<A,T>>
Validation. filter(F<T,java.lang.Boolean> f)
ReturnsNone
if this is a failure or if the given predicatep
does not hold for the success value, otherwise, returns a success inSome
.static <A> P1<Validation<java.io.IOException,A>>
IOFunctions. p(IO<A> io)
static <A> IO<State<java.io.BufferedReader,Validation<java.io.IOException,java.lang.String>>>
IOFunctions. readerState()
default SafeIO<Validation<java.io.IOException,A>>
IO. safe()
static <E,A>
Option<Validation<E,A>>Option. sequence(Validation<E,Option<A>> a)
Sequence a validation through the option monad.static <E,R,C>
Either<Validation<E,C>,R>Validation. sequenceEitherLeft(Validation<E,Either<C,R>> validation)
Sequence the given validation and collect the output on the left side of an either.static <E,L,C>
Either<L,Validation<E,C>>Validation. sequenceEitherRight(Validation<E,Either<L,C>> validation)
Sequence the given validation and collect the output on the right side of an either.static <E,C,B>
F<C,Validation<E,B>>Validation. sequenceF(Validation<E,F<C,B>> validation)
Sequence the given validation and collect the output as a function.static <E,C>
IO<Validation<E,C>>Validation. sequenceIO(Validation<E,IO<C>> validation)
Sequence the given validation and collect the output as an IO.static <E,C>
List<Validation<E,C>>Validation. sequenceList(Validation<E,List<C>> validation)
Sequence the given validation and collect the output as a list.static <E,C>
Option<Validation<E,C>>Validation. sequenceOption(Validation<E,Option<C>> validation)
Sequence the given validation and collect the output as an option.static <E,C>
P1<Validation<E,C>>Validation. sequenceP1(Validation<E,P1<C>> validation)
Sequence the given validation and collect the output as a P1.static <E,C>
Seq<Validation<E,C>>Validation. sequenceSeq(Validation<E,Seq<C>> validation)
Sequence the given validation and collect the output as a seq.static <E,C>
Set<Validation<E,C>>Validation. sequenceSet(Ord<E> ordE, Ord<C> ordC, Validation<E,Set<C>> validation)
Sequence the given validation and collect the output as a set.static <E,C>
Stream<Validation<E,C>>Validation. sequenceStream(Validation<E,Stream<C>> validation)
Sequence the given validation and collect the output as a stream.static <E,C>
Trampoline<Validation<E,C>>Validation. sequenceTrampoline(Validation<E,Trampoline<C>> validation)
Sequence the given validation and collect the output as a trampoline.static <E,E1,C>
Validation<E1,Validation<E,C>>Validation. sequenceValidation(Validation<E,Validation<E1,C>> validation)
Sequence the given validation and collect the output as a validation.static <A> SafeIO<Validation<java.io.IOException,A>>
IOFunctions. toSafeValidation(IO<A> io)
<R,C>
Either<Validation<E,C>,R>Validation. traverseEitherLeft(F<T,Either<C,R>> f)
Traverse this validation with the given function and collect the output on the left side of an either.<L,C>
Either<L,Validation<E,C>>Validation. traverseEitherRight(F<T,Either<L,C>> f)
Traverse this validation with the given function and collect the output on the right side of an either.<C,B>
F<C,Validation<E,B>>Validation. traverseF(F<T,F<C,B>> f)
Traverse this validation with the given function and collect the output as a function.<C> IO<Validation<E,C>>
Validation. traverseIO(F<T,IO<C>> f)
Traverse this validation with the given function and collect the output as an IO.<C> List<Validation<E,C>>
Validation. traverseList(F<T,List<C>> f)
Traverse this validation with the given function and collect the output as a list.<C> Option<Validation<E,C>>
Validation. traverseOption(F<T,Option<C>> f)
Traverse this validation with the given function and collect the output as an option.<C> P1<Validation<E,C>>
Validation. traverseP1(F<T,P1<C>> f)
Traverse this validation with the given function and collect the output as a P1.<C> Seq<Validation<E,C>>
Validation. traverseSeq(F<T,Seq<C>> f)
Traverse this validation with the given function and collect the output as a seq.<C> Set<Validation<E,C>>
Validation. traverseSet(Ord<E> ordE, Ord<C> ordC, F<T,Set<C>> f)
Traverse this validation with the given function and collect the output as a set; use the given success and failure value ords to order the set.<C> Stream<Validation<E,C>>
Validation. traverseStream(F<T,Stream<C>> f)
Traverse this validation with the given function and collect the output as a stream.<C> Trampoline<Validation<E,C>>
Validation. traverseTrampoline(F<T,Trampoline<C>> f)
Traverse this validation with the given function and collect the output as a trampoline.<E1,C>
Validation<E1,Validation<E,C>>Validation. traverseValidation(F<T,Validation<E1,C>> f)
Traverse this validation with the given function and collect the output as a validation.static <A,B,Z extends java.io.IOException>
F<Try1<A,B,Z>,F<A,Validation<Z,B>>>Conversions. Try_F()
static <A,B,Z extends java.io.IOException>
F<A,Validation<Z,B>>Conversions. Try_F(Try1<A,B,Z> t)
static <A,B,Z extends java.lang.Exception>
F<Try0<A,Z>,SafeIO<Validation<Z,A>>>Conversions. Try_SafeIO()
static <A,B,Z extends java.lang.Exception>
SafeIO<Validation<Z,A>>Conversions. Try_SafeIO(Try0<A,Z> t)
static <A,E extends java.lang.Exception>
F<Try0<A,E>,java.util.function.Supplier<Validation<E,A>>>Java8. TryCatch0_Supplier()
static <A,E extends java.lang.Exception>
java.util.function.Supplier<Validation<E,A>>Java8. TryCatch0_Supplier(Try0<A,E> t)
static <A,B,E extends java.lang.Exception>
F<Try1<A,B,E>,java.util.function.Function<A,Validation<E,B>>>Java8. TryCatch1_Function()
static <A,B,E extends java.lang.Exception>
java.util.function.Function<A,Validation<E,B>>Java8. TryCatch1_Function(Try1<A,B,E> t)
static <A,B,C,E extends java.lang.Exception>
F<Try2<A,B,C,E>,java.util.function.BiFunction<A,B,Validation<E,C>>>Java8. TryCatch2_BiFunction()
static <A,B,C,E extends java.lang.Exception>
java.util.function.BiFunction<A,B,Validation<E,C>>Java8. TryCatch2_BiFunction(Try2<A,B,C,E> t)
static <E extends java.lang.Exception>
P1<Validation<E,Unit>>Conversions. TryEffect_P(TryEffect0<E> t)
static <E,T>
F<Either<E,T>,Validation<E,T>>Validation. validation()
Returns a function that constructs a validation with an either.Methods in fj.data with parameters of type Validation Modifier and Type Method Description <A> Validation<E,A>
Validation. accumapply(Semigroup<E> s, Validation<E,F<T,A>> v)
Function application on the successful side of this validation, or accumulating the errors on the failing side using the given semigroup should one or more be encountered.<B,C,D,$E,$F,G,H,I>
Validation<List<E>,I>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, Validation<E,$F> v6, Validation<E,G> v7, Validation<E,H> v8, F8<T,B,C,D,$E,$F,G,H,I> f)
<B,C,D,$E,$F,G,H>
Validation<List<E>,H>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, Validation<E,$F> v6, Validation<E,G> v7, F7<T,B,C,D,$E,$F,G,H> f)
<B,C,D,$E,$F,G>
Validation<List<E>,G>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, Validation<E,$F> v6, F6<T,B,C,D,$E,$F,G> f)
<B,C,D,$E,$F>
Validation<List<E>,$F>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, Validation<E,$E> v5, F5<T,B,C,D,$E,$F> f)
<B,C,D,$E>
Validation<List<E>,$E>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, Validation<E,D> v4, F4<T,B,C,D,$E> f)
<B,C,D>
Validation<List<E>,D>Validation. accumulate(Validation<E,B> v2, Validation<E,C> v3, F3<T,B,C,D> f)
<B,C>
Validation<List<E>,C>Validation. accumulate(Validation<E,B> v2, F2<T,B,C> f)
<A> Option<E>
Validation. accumulate(Semigroup<E> s, Validation<E,A> va)
Accumulates errors anonymously.<A,B>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb)
Accumulates errors anonymously.<A,B,C>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc)
Accumulates errors anonymously.<A,B,C,D>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd)
Accumulates errors anonymously.<A,B,C,D,E$>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve)
Accumulates errors anonymously.<A,B,C,D,E$,F$>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf)
Accumulates errors anonymously.<A,B,C,D,E$,F$,G>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, Validation<E,G> vg)
Accumulates errors anonymously.<A,B,C,D,E$,F$,G,H>
Validation<E,H>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, Validation<E,G> vg, F<T,F<A,F<B,F<C,F<D,F<E$,F<F$,F<G,H>>>>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$,G,H>
Validation<E,H>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, Validation<E,G> vg, F8<T,A,B,C,D,E$,F$,G,H> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$,G>
Validation<E,G>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, F<T,F<A,F<B,F<C,F<D,F<E$,F<F$,G>>>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$,G>
Validation<E,G>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, F7<T,A,B,C,D,E$,F$,G> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$>
Validation<E,F$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, F<T,F<A,F<B,F<C,F<D,F<E$,F$>>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$,F$>
Validation<E,F$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, F6<T,A,B,C,D,E$,F$> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$>
Validation<E,E$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, F<T,F<A,F<B,F<C,F<D,E$>>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D,E$>
Validation<E,E$>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, F5<T,A,B,C,D,E$> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D>
Validation<E,D>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, F<T,F<A,F<B,F<C,D>>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C,D>
Validation<E,D>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, F4<T,A,B,C,D> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C>
Validation<E,C>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, F<T,F<A,F<B,C>>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B,C>
Validation<E,C>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, F3<T,A,B,C> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B>
Validation<E,B>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, F<T,F<A,B>> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A,B>
Validation<E,B>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, F2<T,A,B> f)
Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.<A> Validation<E,A>
Validation. apply(Validation<E,F<T,A>> v)
Function application on the success value.<A> Validation<A,T>
Validation.FailProjection. apply(Validation<F<E,A>,T> v)
Function application on the failing value.static <E,A>
Option<Validation<E,A>>Option. sequence(Validation<E,Option<A>> a)
Sequence a validation through the option monad.<A> Validation<A,T>
Validation.FailProjection. sequence(Validation<A,T> v)
Performs a bind across the validation, but ignores the element value in the function.<A> Validation<E,A>
Validation. sequence(Validation<E,A> v)
Anonymous bind through this validation.static <E,R,C>
Either<Validation<E,C>,R>Validation. sequenceEitherLeft(Validation<E,Either<C,R>> validation)
Sequence the given validation and collect the output on the left side of an either.static <E,L,C>
Either<L,Validation<E,C>>Validation. sequenceEitherRight(Validation<E,Either<L,C>> validation)
Sequence the given validation and collect the output on the right side of an either.static <E,C,B>
F<C,Validation<E,B>>Validation. sequenceF(Validation<E,F<C,B>> validation)
Sequence the given validation and collect the output as a function.static <E,C>
IO<Validation<E,C>>Validation. sequenceIO(Validation<E,IO<C>> validation)
Sequence the given validation and collect the output as an IO.static <E,C>
List<Validation<E,C>>Validation. sequenceList(Validation<E,List<C>> validation)
Sequence the given validation and collect the output as a list.static <E,C>
Option<Validation<E,C>>Validation. sequenceOption(Validation<E,Option<C>> validation)
Sequence the given validation and collect the output as an option.static <E,C>
P1<Validation<E,C>>Validation. sequenceP1(Validation<E,P1<C>> validation)
Sequence the given validation and collect the output as a P1.static <E,C>
Seq<Validation<E,C>>Validation. sequenceSeq(Validation<E,Seq<C>> validation)
Sequence the given validation and collect the output as a seq.static <E,C>
Set<Validation<E,C>>Validation. sequenceSet(Ord<E> ordE, Ord<C> ordC, Validation<E,Set<C>> validation)
Sequence the given validation and collect the output as a set.static <E,C>
Stream<Validation<E,C>>Validation. sequenceStream(Validation<E,Stream<C>> validation)
Sequence the given validation and collect the output as a stream.static <E,C>
Trampoline<Validation<E,C>>Validation. sequenceTrampoline(Validation<E,Trampoline<C>> validation)
Sequence the given validation and collect the output as a trampoline.static <E,E1,C>
Validation<E1,Validation<E,C>>Validation. sequenceValidation(Validation<E,Validation<E1,C>> validation)
Sequence the given validation and collect the output as a validation.Method parameters in fj.data with type arguments of type Validation Modifier and Type Method Description <A> Validation<E,A>
Validation. bind(F<T,Validation<E,A>> f)
Binds the given function across this validation's success value if it has one.<A> Validation<A,T>
Validation.FailProjection. bind(F<E,Validation<A,T>> f)
Binds the given function across this validation's failing value if it has one.static <A,E>
List<E>Validation. fails(List<Validation<E,?>> list)
static <A,B>
P2<List<A>,List<B>>Validation. partition(List<Validation<A,B>> list)
Partitions the list into the list of fails and the list of successesstatic <E,A>
Validation<E,List<A>>Validation. sequence(Semigroup<E> s, List<Validation<E,A>> list)
If list contains a failure, returns a failure of the reduction of all the failures using the semigroup, otherwise returns the successful list.static <A,E>
Validation<List<E>,List<A>>Validation. sequenceNonCumulative(List<Validation<E,A>> list)
If the list contains a failure, returns a Validation of the list of fails in the list, otherwise returns a successful Validation with the list of successful values.static <E,B>
Validation<E,List<B>>List. sequenceValidation(Semigroup<E> semigroup, List<Validation<E,B>> list)
Sequence the given list and collect the output as a validation; use the given semigroup to reduce the errors.static <E,B>
Validation<E,Option<B>>Option. sequenceValidation(Option<Validation<E,B>> option)
Sequence the given option and collect the output as a validation.static <E,B>
Validation<E,Seq<B>>Seq. sequenceValidation(Seq<Validation<E,B>> seq)
Sequence the given seq and collect the output as a validation.static <E,B>
Validation<E,Seq<B>>Seq. sequenceValidation(Semigroup<E> semigroup, Seq<Validation<E,B>> seq)
Sequence the given seq and collect the output as a validation; use the given semigroup to reduce the errors.static <E,B>
Validation<E,Stream<B>>Stream. sequenceValidation(Stream<Validation<E,B>> stream)
Sequence the given stream and collect the output as a validation.static <E,B>
Validation<E,Stream<B>>Stream. sequenceValidation(Semigroup<E> semigroup, Stream<Validation<E,B>> stream)
Sequence the given stream and collect the output as a validation; use the given semigroup to reduce the errors.static <E,E1,C>
Validation<E1,Validation<E,C>>Validation. sequenceValidation(Validation<E,Validation<E1,C>> validation)
Sequence the given validation and collect the output as a validation.static <A,E>
List<A>Validation. successes(List<Validation<E,A>> list)
<E,B>
Validation<E,List<B>>List. traverseValidation(Semigroup<E> s, F<A,Validation<E,B>> f)
Traverse this list with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E,B>
Validation<E,Option<B>>Option. traverseValidation(F<A,Validation<E,B>> f)
Traverse this option with the given function and collect the output as a validation.<E,B>
Validation<E,Seq<B>>Seq. traverseValidation(F<A,Validation<E,B>> f)
Traverse this seq with the given function and collect the output as a validation.<E,B>
Validation<E,Seq<B>>Seq. traverseValidation(Semigroup<E> semigroup, F<A,Validation<E,B>> f)
Traverse this seq with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E,B>
Validation<E,Stream<B>>Stream. traverseValidation(F<A,Validation<E,B>> f)
Traverse this stream with the given function and collect the output as a validation.<E,B>
Validation<E,Stream<B>>Stream. traverseValidation(Semigroup<E> semigroup, F<A,Validation<E,B>> f)
Traverse this stream with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E1,C>
Validation<E1,Validation<E,C>>Validation. traverseValidation(F<T,Validation<E1,C>> f)
Traverse this validation with the given function and collect the output as a validation.Constructors in fj.data with parameters of type Validation Constructor Description FailProjection(Validation<E,T> v)
-
Uses of Validation in fj.data.optic
Methods in fj.data.optic that return types with arguments of type Validation Modifier and Type Method Description <E> F<S,Validation<E,S>>
Lens. modifyValidationF(F<A,Validation<E,A>> f)
<E> F<S,Validation<E,S>>
Optional. modifyValidationF(F<A,Validation<E,A>> f)
<E> F<S,Validation<E,T>>
PIso. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPIso
with an Applicative functionabstract <E> F<S,Validation<E,T>>
PLens. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPLens
with an Applicative functionabstract <E> F<S,Validation<E,T>>
POptional. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPOptional
with an Applicative function<E> F<S,Validation<E,T>>
PPrism. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPPrism
with an Applicative functionabstract <E> F<S,Validation<E,T>>
PTraversal. modifyValidationF(Semigroup<E> s, F<A,Validation<E,B>> f)
modify polymorphically the target of aPTraversal
with an Applicative function<E> F<S,Validation<E,S>>
Traversal. modifyValidationF(Semigroup<E> s, F<A,Validation<E,A>> f)
Method parameters in fj.data.optic with type arguments of type Validation Modifier and Type Method Description <E> F<S,Validation<E,S>>
Lens. modifyValidationF(F<A,Validation<E,A>> f)
<E> F<S,Validation<E,S>>
Optional. modifyValidationF(F<A,Validation<E,A>> f)
<E> F<S,Validation<E,T>>
PIso. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPIso
with an Applicative functionabstract <E> F<S,Validation<E,T>>
PLens. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPLens
with an Applicative functionabstract <E> F<S,Validation<E,T>>
POptional. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPOptional
with an Applicative function<E> F<S,Validation<E,T>>
PPrism. modifyValidationF(F<A,Validation<E,B>> f)
modify polymorphically the target of aPPrism
with an Applicative functionabstract <E> F<S,Validation<E,T>>
PTraversal. modifyValidationF(Semigroup<E> s, F<A,Validation<E,B>> f)
modify polymorphically the target of aPTraversal
with an Applicative function<E> F<S,Validation<E,S>>
Traversal. modifyValidationF(Semigroup<E> s, F<A,Validation<E,A>> f)
-
Uses of Validation in fj.function
Methods in fj.function that return types with arguments of type Validation Modifier and Type Method Description default F0<Validation<Z,A>>
Try0. toF0()
default P1<Validation<Z,A>>
Try0. toP1()
-
Uses of Validation in fj.parser
Fields in fj.parser with type parameters of type Validation Modifier and Type Field Description private F<I,Validation<E,Result<I,A>>>
Parser. f
Methods in fj.parser that return Validation Modifier and Type Method Description Validation<E,Result<I,A>>
Parser. parse(I i)
Parses the input to produce a result or error.Method parameters in fj.parser with type arguments of type Validation Modifier and Type Method Description static <I,A,E>
Parser<I,A,E>Parser. parser(F<I,Validation<E,Result<I,A>>> f)
Returns a parser that computes using the given function.Constructor parameters in fj.parser with type arguments of type Validation Constructor Description Parser(F<I,Validation<E,Result<I,A>>> f)
-