Uses of Class
io.atlassian.fugue.Either
Packages that use Either
Package
Description
-
Uses of Either in io.atlassian.fugue
Subclasses of Either in io.atlassian.fugueModifier and TypeClassDescription(package private) static final classEither.Left<L,R> (package private) static final classEither.Right<L,R> Methods in io.atlassian.fugue that return EitherModifier and TypeMethodDescriptionFunction application on this projection's value.Function application on this projection's value.Function application on this projection's value.Deprecated.Deprecated.since 3.0Deprecated.since 3.0 see apEither.LeftProjection.as()Coerces our right type as X.Either.RightProjection.as()Coerces our left type as X.abstract <LL,RR> Either <LL, RR> Map the given functions across the appropriate side.<LL,RR> Either <LL, RR> Either.Left.bimap(Function<? super L, ? extends LL> ifLeft, Function<? super R, ? extends RR> ifRight) <LL,RR> Either <LL, RR> Either.Right.bimap(Function<? super L, ? extends LL> ifLeft, Function<? super R, ? extends RR> ifRight) static <L,R> Either <L, R> Eithers.cond(boolean predicate, L left, R right) Creates an Either based on a boolean expression.Either.AbstractProjection.either()Either.Projection.either()The either value underlying this projection.Either.filterOrElse(Predicate<? super R> p, Supplier<? extends L> orElseSupplier) Return aRightif this is aRightand the contained values satisfies the given predicate.Either.LeftProjection.filterOrElse(Predicate<? super L> p, Supplier<? extends R> orElseSupplier) Return aLeftif this is aLeftand the contained values satisfies the given predicate.Either.RightProjection.filterOrElse(Predicate<? super R> p, Supplier<? extends L> orElseSupplier) Return aRightif this is aRightand the contained values satisfies the given predicate.Binds the given function across the right hand side value if it is one.Binds the given function across this projection's value if it has one.Binds the given function across this projection's value if it has one.static <L,R> Either <L, R> Either.left(L left) left.Map the given function across the left hand side value if it is one.Map the given function across this projection's value if it has one.Map the given function across the right hand side value if it is one.Map the given function across this projection's value if it has one.If this is a right, return the same right.If this is a right, return the same right.static <L,R> Either <L, R> Either.right(R right) right.Anonymous bind through this projection.Anonymous bind through this projection.Will return the supplied Either if this one is right, otherwise this one if left.Eithers.sequenceLeft(Iterable<Either<L, R>> eithers) Collect the left values if there are only lefts, otherwise return the first right encountered.static <L,R, A, C> Either <C, R> Eithers.sequenceLeft(Iterable<Either<L, R>> eithers, Collector<L, A, C> collector) Collect the left values if there are only lefts, otherwise return the first right encountered.Eithers.sequenceRight(Iterable<Either<L, R>> eithers) Collect the right values if there are only rights, otherwise return the first left encountered.static <L,R, A, C> Either <L, C> Eithers.sequenceRight(Iterable<Either<L, R>> eithers, Collector<R, A, C> collector) Collect the right values if there are only rights, otherwise return the first left encountered.Either.Left.swap()Either.Right.swap()Either.swap()If this is a left, then return the left value in right, or vice versa.Try.Delayed.toEither()Try.Failure.toEither()Try.Success.toEither()Try.toEither()Convert this Try to anEither, becoming a left if this is a failure and a right if this is a success.Creates an Either from this Option.Creates an Either from this Option.static <LL, L extends LL, R>
Either<LL, R> Eithers.upcastLeft(Either<L, R> e) Upcasts aneitherof left type L to an either of left type LL, which is a super type of L, keeping the right type unchanged.static <L, RR, R extends RR>
Either<L, RR> Eithers.upcastRight(Either<L, R> e) Upcasts aneitherof right type R to an either of right type RR, which is a super type of R, keeping the left type unchanged.Methods in io.atlassian.fugue that return types with arguments of type EitherModifier and TypeMethodDescriptionA monoid Sums up values inside eitherSemigroups.either(Semigroup, Semigroup).Sums up values inside either, if both are left or right.ReturnsNoneif this is a left or if the given predicatepdoes not hold for the contained value, otherwise, returns a right inSome.ReturnsNoneif this projection has no value or if the given predicatepdoes not hold for the value, otherwise, returns a left inSome.ReturnsNoneif this projection has no value or if the given predicatepdoes not hold for the value, otherwise, returns a right inSome.Eithers.isLeft()A predicate that tests if the supplied either is a left.Eithers.isRight()A predicate that tests if the supplied either is a right.Eithers.leftMapper()A function that maps an either to an option of its left type.Eithers.rightMapper()A function that maps an either to an option of its right type.FugueCollectors.toEitherLeft()Collect the left values if there are only lefts, otherwise return the first right encountered.FugueCollectors.toEitherLeft()Collect the left values if there are only lefts, otherwise return the first right encountered.FugueCollectors.toEitherLeft(Collector<L, A, B> lCollector) Collect the left values if there are only lefts, otherwise return the first right encountered.FugueCollectors.toEitherLeft(Collector<L, A, B> lCollector) Collect the left values if there are only lefts, otherwise return the first right encountered.FugueCollectors.toEitherRight()Collect the right values if there are only rights, otherwise return the first left encountered.FugueCollectors.toEitherRight()Collect the right values if there are only rights, otherwise return the first left encountered.FugueCollectors.toEitherRight(Collector<R, A, B> rCollector) Collect the right values if there are only rights, otherwise return the first left encountered.FugueCollectors.toEitherRight(Collector<R, A, B> rCollector) Collect the right values if there are only rights, otherwise return the first left encountered.Eithers.toLeft()Function to convert from an value to aEither.Leftcontaining that value.Function to convert from a value to aEither.Leftcontaining that value.Eithers.toLeft(L l) Supplier returning aEither.Left.Supplier returning aEither.Left.Eithers.toRight()Function to convert from an value to aEither.Right.Function to convert from a value to aEither.Rightcontaining that value.Supplier returning aEither.Right.Eithers.toRight(R r) Supplier returning aEither.Right.Methods in io.atlassian.fugue with parameters of type EitherModifier and TypeMethodDescriptionFunction application on this projection's value.Function application on this projection's value.Function application on this projection's value.Deprecated.since 3.0 seeEither.ap(Either)Deprecated.since 3.0Deprecated.since 3.0 see apstatic <X extends Exception, A>
AEithers.getOrThrow(Either<X, A> either) Simplifies extracting a value or throwing a checked exception from an Either.static <T> TExtracts an object from an Either, regardless of the side in which it is stored, provided both sides contain the same type.If this is a right, return the same right.Anonymous bind through this projection.Anonymous bind through this projection.Will return the supplied Either if this one is right, otherwise this one if left.static <LL, L extends LL, R>
Either<LL, R> Eithers.upcastLeft(Either<L, R> e) Upcasts aneitherof left type L to an either of left type LL, which is a super type of L, keeping the right type unchanged.static <L, RR, R extends RR>
Either<L, RR> Eithers.upcastRight(Either<L, R> e) Upcasts aneitherof right type R to an either of right type RR, which is a super type of R, keeping the left type unchanged.Method parameters in io.atlassian.fugue with type arguments of type EitherModifier and TypeMethodDescriptionstatic <L,R> Iterable <L> Eithers.filterLeft(Iterable<Either<L, R>> it) static <L,R> Iterable <R> Eithers.filterRight(Iterable<Either<L, R>> it) Binds the given function across the right hand side value if it is one.Binds the given function across this projection's value if it has one.Binds the given function across this projection's value if it has one.If this is a right, return the same right.Eithers.sequenceLeft(Iterable<Either<L, R>> eithers) Collect the left values if there are only lefts, otherwise return the first right encountered.static <L,R, A, C> Either <C, R> Eithers.sequenceLeft(Iterable<Either<L, R>> eithers, Collector<L, A, C> collector) Collect the left values if there are only lefts, otherwise return the first right encountered.Eithers.sequenceRight(Iterable<Either<L, R>> eithers) Collect the right values if there are only rights, otherwise return the first left encountered.static <L,R, A, C> Either <L, C> Eithers.sequenceRight(Iterable<Either<L, R>> eithers, Collector<R, A, C> collector) Collect the right values if there are only rights, otherwise return the first left encountered. -
Uses of Either in io.atlassian.fugue.extensions.step
Fields in io.atlassian.fugue.extensions.step declared as EitherModifier and TypeFieldDescriptionEitherStep1.either1EitherStep2.either1EitherStep3.either1EitherStep4.either1EitherStep5.either1EitherStep6.either1EitherStep2.either2EitherStep3.either2EitherStep4.either2EitherStep5.either2EitherStep6.either2EitherStep3.either3EitherStep4.either3EitherStep5.either3EitherStep6.either3EitherStep4.either4EitherStep5.either4EitherStep6.either4EitherStep5.either5EitherStep6.either5EitherStep6.either6Methods in io.atlassian.fugue.extensions.step that return EitherModifier and TypeMethodDescriptionTerminating step expression, that will provide the previous steps to this function and return the result as aRightEitherStep2.yield(BiFunction<? super A, ? super B, Z> functor) Terminating step expression, that will provide the previous steps to this function and return the result as aRightTerminating step expression, that will provide the previous steps to this function and return the result as aRightTerminating step expression, that will provide the previous steps to this function and return the result as aRightTerminating step expression, that will provide the previous steps to this function and return the result as aRightEitherStep6.yield(Function6<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, Z> functor) Terminating step expression, that will provide the previous steps to this function and return the result as aRightMethods in io.atlassian.fugue.extensions.step with parameters of type EitherModifier and TypeMethodDescriptionstatic <A,LEFT> EitherStep1 <A, LEFT> Begin a new Steps expresison, using theEithertype.Method parameters in io.atlassian.fugue.extensions.step with type arguments of type EitherModifier and TypeMethodDescription<B, LL extends LEFT>
EitherStep2<A, B, LEFT> Apply the provided function with the previous Step results.<B, LL extends LEFT>
EitherStep2<A, B, LEFT> Apply the provided supplier with the previous Step results.<C, LL extends LEFT>
EitherStep3<A, B, C, LEFT> EitherStep2.then(BiFunction<? super A, ? super B, Either<LL, C>> functor) Apply the provided function with the previous Step results.<C, LL extends LEFT>
EitherStep3<A, B, C, LEFT> Apply the provided supplier with the previous Step results.Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.EitherStep5.then(Function5<? super A, ? super B, ? super C, ? super D, ? super E, Either<LL, F>> functor) Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Constructors in io.atlassian.fugue.extensions.step with parameters of type EitherModifierConstructorDescription(package private)EitherStep1(Either<LEFT, A> either1) (package private)(package private)(package private)EitherStep4(Either<LEFT, A> either1, Either<LEFT, B> either2, Either<LEFT, C> either3, Either<LEFT, D> either4) (package private)EitherStep5(Either<LEFT, A> either1, Either<LEFT, B> either2, Either<LEFT, C> either3, Either<LEFT, D> either4, Either<LEFT, E> either5) (package private)EitherStep6(Either<LEFT, A> either1, Either<LEFT, B> either2, Either<LEFT, C> either3, Either<LEFT, D> either4, Either<LEFT, E> either5, Either<LEFT, F> either6) -
Uses of Either in io.atlassian.fugue.hamcrest
Subclasses with type arguments of type Either in io.atlassian.fugue.hamcrestModifier and TypeClassDescriptionprivate static classprivate static classMethods in io.atlassian.fugue.hamcrest that return types with arguments of type EitherModifier and TypeMethodDescriptionstatic <L> org.hamcrest.Matcher<Either<L, ?>> EitherMatchers.isLeft(org.hamcrest.Matcher<? super L> subMatcher) static <R> org.hamcrest.Matcher<Either<?, R>> EitherMatchers.isRight(org.hamcrest.Matcher<? super R> subMatcher) Methods in io.atlassian.fugue.hamcrest with parameters of type EitherModifier and TypeMethodDescriptionprotected voidEitherMatchers.LeftMatcher.describeMismatchSafely(Either<L, ?> actual, org.hamcrest.Description mismatchDescription) protected voidEitherMatchers.RightMatcher.describeMismatchSafely(Either<?, R> actual, org.hamcrest.Description mismatchDescription) protected booleanEitherMatchers.LeftMatcher.matchesSafely(Either<L, ?> actual) protected booleanEitherMatchers.RightMatcher.matchesSafely(Either<?, R> actual) -
Uses of Either in io.atlassian.fugue.optic
Methods in io.atlassian.fugue.optic that return EitherModifier and TypeMethodDescriptionOptional.getOrModify(S s) POptional.getOrModify(S s) get the target of aPOptionalor modify the source in case there is no targetPPrism.getOrModify(S s) get the target of aPPrismor modify the source in case there is no targetPrism.getOrModify(S s) Methods in io.atlassian.fugue.optic that return types with arguments of type EitherModifier and TypeMethodDescriptionFold.codiagonal()Getter.codiagonal()Setter.codiagonal()Traversal.codiagonal()Lens.modifyEitherF(Function<A, Either<L, A>> f) Optional.modifyEitherF(Function<A, Either<L, A>> f) PIso.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPIsowith an Applicative functionPLens.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPLenswith an Applicative functionPOptional.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPOptionalwith an Applicative functionPPrism.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPPrismwith an Applicative functionPTraversal.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPTraversalwith an Applicative functionTraversal.modifyEitherF(Function<A, Either<L, A>> f) PSetter.pCodiagonal()PSetter.pCodiagonal()static <S,T> PTraversal <Either<S, S>, Either<T, T>, S, T> PTraversal.pCodiagonal()static <S,T> PTraversal <Either<S, S>, Either<T, T>, S, T> PTraversal.pCodiagonal()join twoFoldwith the same targetjoin twoGetterwith the same targetjoin twoLenswith the same targetjoin twoOptionalwith the same targetjoin twoPLenswith the same targetjoin twoPLenswith the same targetjoin twoPOptionalwith the same targetjoin twoPOptionalwith the same targetjoin twoPSetterwith the same targetjoin twoPSetterwith the same targetPTraversal.sum(PTraversal<S1, T1, A, B> other) join twoPTraversalwith the same targetPTraversal.sum(PTraversal<S1, T1, A, B> other) join twoPTraversalwith the same targetjoin twoSetterwith the same targetjoin twoTraversalwith the same targetMethod parameters in io.atlassian.fugue.optic with type arguments of type EitherModifier and TypeMethodDescriptionLens.modifyEitherF(Function<A, Either<L, A>> f) Optional.modifyEitherF(Function<A, Either<L, A>> f) PIso.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPIsowith an Applicative functionPLens.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPLenswith an Applicative functionPOptional.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPOptionalwith an Applicative functionPPrism.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPPrismwith an Applicative functionPTraversal.modifyEitherF(Function<A, Either<L, B>> f) modify polymorphically the target of aPTraversalwith an Applicative functionTraversal.modifyEitherF(Function<A, Either<L, A>> f) static <S,T, A, B> POptional <S, T, A, B> create aPOptionalusing the canonical functions: getOrModify and setstatic <S,T, A, B> PPrism <S, T, A, B> create aPPrismusing the canonical functions: getOrModify and reverseGet -
Uses of Either in io.atlassian.fugue.optic.law
Methods in io.atlassian.fugue.optic.law that return types with arguments of type EitherModifier and TypeMethodDescriptionIsoLaws.modifyEitherFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)LensLaws.modifyEitherFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)OptionalLaws.modifyEitherFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)PrismLaws.modifyEitherFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)TraversalLaws.modifyEitherFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_) -
Uses of Either in io.atlassian.fugue.optic.std
Methods in io.atlassian.fugue.optic.std that return types with arguments of type Either
Either.ap(Either)