Uses of Class
fj.data.Validation
Packages that use Validation
Package
Description
Types that set the premise for the existence of Functional Java.
Common algebraic data types.
Optic data types adapted from the Scala Monocle library
and inspired by the
Haskell Lens library.
A prelude of commonly used first-class functions
Parser combinators.
-
Uses of Validation in fj
Methods in fj that return ValidationModifier and TypeMethodDescriptionfinal <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 ValidationModifier and TypeMethodDescriptionstatic <A,
E extends Exception>
P1<Validation<E, A>> 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 Exception>
F<A, Validation<E, B>> 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 Exception>
F2<A, B, Validation<E, C>> 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 Exception>
F3<A, B, C, Validation<E, D>> 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 Exception>
F4<A, B, C, D, Validation<Z, E>> 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 Exception>
F5<A, B, C, D, E, Validation<Z, F>> 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 Exception>
F6<A, B, C, D, E, F, Validation<Z, G>> 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 Exception>
F7<A, B, C, D, E, F, G, Validation<Z, H>> 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 Exception>
F8<A, B, C, D, E, F, G, H, Validation<Z, I>> 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 Exception>
P1<Validation<Z, Unit>> TryEffect.f
(TryEffect0<Z> t) static <A,
Z extends Exception>
F<A, Validation<Z, Unit>> TryEffect.f
(TryEffect1<A, Z> t) static <A,
B, Z extends Exception>
F2<A, B, Validation<Z, Unit>> TryEffect.f
(TryEffect2<A, B, Z> t) static <A,
B, C, Z extends Exception>
F3<A, B, C, Validation<Z, Unit>> TryEffect.f
(TryEffect3<A, B, C, Z> t) static <A,
B, C, D, Z extends 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 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 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 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 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 ValidationModifier and TypeMethodDescriptionfinal <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 ValidationFields in fj.data with type parameters of type ValidationModifier and TypeFieldDescriptionstatic final F
<String, Validation<NumberFormatException, Byte>> Validation.parseByte
A function that parses a string into a byte.static final F
<String, Validation<NumberFormatException, Double>> Validation.parseDouble
A function that parses a string into a double.static final F
<String, Validation<NumberFormatException, Float>> Validation.parseFloat
A function that parses a string into a float.static final F
<String, Validation<NumberFormatException, Integer>> Validation.parseInt
A function that parses a string into an integer.static final F
<String, Validation<NumberFormatException, Long>> Validation.parseLong
A function that parses a string into a long.static final F
<String, Validation<NumberFormatException, Short>> Validation.parseShort
A function that parses a string into a short.Methods in fj.data that return ValidationModifier and TypeMethodDescriptionfinal <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.final Validation
<List<E>, T> Validation.accumulate()
final <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) final <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) final <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) final <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) final <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) final <B,
C, D> Validation <List<E>, D> Validation.accumulate
(Validation<E, B> v2, Validation<E, C> v3, F3<T, B, C, D> f) final <B,
C> Validation <List<E>, C> Validation.accumulate
(Validation<E, B> v2, F2<T, B, C> f) final <B> Validation
<List<E>, B> Validation.accumulate
(F<T, B> f) final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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> Maps the given function across the failing side of this validation.final <A> Validation
<E, A> Maps the given function across the success side of this validation.final Validation
<NonEmptyList<E>, T> Validation.nel()
Puts this validation's failing value in a non-empty list if there is one.static Validation
<NumberFormatException, Byte> Parses the given string into a byte.static Validation
<NumberFormatException, Double> Validation.parseDouble
(String s) Parses the given string into a double.static Validation
<NumberFormatException, Float> Validation.parseFloat
(String s) Parses the given string into a float.static Validation
<NumberFormatException, Integer> Parses the given string into a integer.static Validation
<NumberFormatException, Long> Parses the given string into a long.static Validation
<NumberFormatException, Short> Validation.parseShort
(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.final <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 final <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 final <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 final <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.final <X> Validation
<X, A> Option.toValidation
(X x) final <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.final <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.final <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.final <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.final <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 ValidationModifier and TypeMethodDescriptionstatic <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>> ReturnsNone
if this is a success or if the given predicatep
does not hold for the failing value, otherwise, returns a fail inSome
.final <A> Option
<Validation<A, T>> 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<IOException, A>> static <A> IO
<State<BufferedReader, Validation<IOException, String>>> IOFunctions.readerState()
default SafeIO
<Validation<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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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<IOException, A>> IOFunctions.toSafeValidation
(IO<A> io) final <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.final <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.final <C,
B> F <C, Validation<E, B>> Traverse this validation with the given function and collect the output as a function.final <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.final <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.final <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.final <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.final <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.final <C> Set
<Validation<E, C>> 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.final <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.final <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.final <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 IOException>
F<Try1<A, B, Z>, F<A, Validation<Z, B>>> Conversions.Try_F()
static <A,
B, Z extends IOException>
F<A, Validation<Z, B>> static <A,
B, Z extends Exception>
F<Try0<A, Z>, SafeIO<Validation<Z, A>>> Conversions.Try_SafeIO()
static <A,
B, Z extends Exception>
SafeIO<Validation<Z, A>> Conversions.Try_SafeIO
(Try0<A, Z> t) static <A,
E extends Exception>
F<Try0<A, E>, Supplier<Validation<E, A>>> Java8.TryCatch0_Supplier()
static <A,
E extends Exception>
Supplier<Validation<E, A>> Java8.TryCatch0_Supplier
(Try0<A, E> t) static <A,
B, E extends Exception>
F<Try1<A, B, E>, Function<A, Validation<E, B>>> Java8.TryCatch1_Function()
static <A,
B, E extends Exception>
Function<A, Validation<E, B>> Java8.TryCatch1_Function
(Try1<A, B, E> t) static <A,
B, C, E extends Exception>
F<Try2<A, B, C, E>, BiFunction<A, B, Validation<E, C>>> Java8.TryCatch2_BiFunction()
static <A,
B, C, E extends Exception>
BiFunction<A, B, Validation<E, C>> Java8.TryCatch2_BiFunction
(Try2<A, B, C, E> t) static <E extends 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 ValidationModifier and TypeMethodDescriptionfinal <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.final <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) final <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) final <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) final <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) final <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) final <B,
C, D> Validation <List<E>, D> Validation.accumulate
(Validation<E, B> v2, Validation<E, C> v3, F3<T, B, C, D> f) final <B,
C> Validation <List<E>, C> Validation.accumulate
(Validation<E, B> v2, F2<T, B, C> f) Validation.accumulate
(Semigroup<E> s, Validation<E, A> va) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd) Accumulates errors anonymously.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.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.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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <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.final <A> Validation
<E, A> Validation.sequence
(Validation<E, A> v) Anonymous bind through this validation.static final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 final <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 ValidationModifier and TypeMethodDescriptionfinal <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) 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 final <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 final <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 final <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) final <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.final <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.final <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.final <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.final <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 -
Uses of Validation in fj.data.optic
Methods in fj.data.optic that return types with arguments of type ValidationModifier and TypeMethodDescription<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) final <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 functionfinal <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 ValidationModifier and TypeMethodDescription<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) final <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 functionfinal <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 ValidationModifier and TypeMethodDescriptiondefault 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 ValidationMethods in fj.parser that return ValidationModifier and TypeMethodDescriptionValidation
<E, Result<I, A>> Parses the input to produce a result or error.Method parameters in fj.parser with type arguments of type ValidationModifier and TypeMethodDescriptionstatic <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