public class EitherKt
public static <L,R,A> A fold(@NotNull
Either<? extends L,? extends R> $this$fold,
@NotNull
kotlin.jvm.functions.Function1<? super L,? extends A> fnL,
@NotNull
kotlin.jvm.functions.Function1<? super R,? extends A> fnR)
public static <L,R,A> A foldR(@NotNull
FoldIntermediate<L,R,A> $this$foldR,
@NotNull
kotlin.jvm.functions.Function1<? super R,? extends A> fnR)
L - left type
R - right type
A - result type
fnR - right fn for the fold on this FoldIntermediate@NotNull public static <L,R,A> FoldIntermediate<L,R,A> foldL(@NotNull Either<? extends L,? extends R> $this$foldL, @NotNull kotlin.jvm.functions.Function1<? super L,? extends A> fnL)
L - left type
R - right type
A - result type
fnL - left fn for the fold on this EitherfnL or fnR to this Either where fnL and fnR are defined by this method
and class FoldIntermediatepublic static boolean isLeft(@NotNull
Either<?,?> $this$isLeft)
true if this Either is a left, false otherwisepublic static boolean isRight(@NotNull
Either<?,?> $this$isRight)
true if this Either is a right, false otherwise@NotNull public static <L,R,S> Either<L,S> bindSyntax(@NotNull Either<? extends L,? extends R> $this$bindSyntax, @NotNull kotlin.jvm.functions.Function2<? super tech.codingzen.kata.either.EitherFixedLeftSyntax<L>,? super R,? extends tech.codingzen.kata.either.Either<? extends L,? extends S>> fn)
L - left type
R - right type
S - new right type
fn - fn used to transform the right value of this Eitherfn to the right value of this Either. If this Either is a left it is returned
unchanged@NotNull public static <L,R,S> Either<L,S> bind(@NotNull Either<? extends L,? extends R> $this$bind, @NotNull kotlin.jvm.functions.Function1<? super R,? extends tech.codingzen.kata.either.Either<? extends L,? extends S>> fn)
L - left type
R - right type
S - new right type
fn - fn used to transform the right value of this Eitherfn to the right value of this Either. If this Either is a left it is returned
unchanged@NotNull public static <L,R,S> Either<L,S> map(@NotNull Either<? extends L,? extends R> $this$map, @NotNull kotlin.jvm.functions.Function1<? super R,? extends S> fn)
L - left type
R - right type
S - new right type
fn - fn used to transform the right value of this Eitherfn to the right value of this Either. If
this Either is a left it is returned unchanged@NotNull public static <L,R> Either<L,R> filter(@NotNull Either<? extends L,? extends R> $this$filter, @NotNull kotlin.jvm.functions.Function1<? super tech.codingzen.kata.either.FilterSyntax<L,R>,kotlin.Unit> body)
L - left type
R - right type
body - used to facilitate a more vertical syntax for the filter operationhandler (defined by body) to the right value that did not pass the filter test@NotNull public static <L,R> Either<L,R> peekRight(@NotNull Either<? extends L,? extends R> $this$peekRight, @NotNull kotlin.jvm.functions.Function1<? super R,kotlin.Unit> body)
L - left type
R - right type
body - block of code that is executed if this Either contains a right value@NotNull public static <L,R> Either<L,R> peekLeft(@NotNull Either<? extends L,? extends R> $this$peekLeft, @NotNull kotlin.jvm.functions.Function1<? super L,kotlin.Unit> body)
L - left type
R - right type
body - block of code that is executed if this Either contains a left valuepublic static <L,R> R onLeft(@NotNull
Either<? extends L,? extends R> $this$onLeft,
@NotNull
kotlin.jvm.functions.Function1 block)
L - left type
R - right type
block - block of code that is executed if this Either contains a left valuepublic static <L,R> L onRight(@NotNull
Either<? extends L,? extends R> $this$onRight,
@NotNull
kotlin.jvm.functions.Function1 block)
L - left type
R - right type
block - block of code that is executed if this Either contains a left valuepublic static <T> T get(@NotNull
Either<? extends T,? extends T> $this$get)
T - both left and right type
public static <L> L getLeft(@NotNull
Either<? extends L,?> $this$left)
L - left typeNoSuchElementException - if this Either contains a right valuepublic static <R> R getRight(@NotNull
Either<?,? extends R> $this$right)
R - right typeNoSuchElementException - if this Either contains a left valuepublic static <R> R orElse(@NotNull
Either<?,? extends R> $this$orElse,
R p)
R - right type
p - value to return if this Either contains a left valuedefault if this Either contains a left valuepublic static <L,R> R orElseMap(@NotNull
Either<? extends L,? extends R> $this$orElseMap,
@NotNull
kotlin.jvm.functions.Function1<? super L,? extends R> fn)
L - left type
R - right type
fn - mapping function to transform the left value to an instance of Rfn to this Either's left valuepublic static <L,R> R orElseGet(@NotNull
Either<? extends L,? extends R> $this$orElseGet,
@NotNull
kotlin.jvm.functions.Function0<? extends R> fn)
L - left type
R - right type
fn - function that produces a default valuefnpublic static <R> R orThrow(@NotNull
Either<?,? extends R> $this$orThrow,
@NotNull
kotlin.jvm.functions.Function0<? extends java.lang.Throwable> fn)
@NotNull public static <L,R,M> Either<M,R> bindLeftSyntax(@NotNull Either<? extends L,? extends R> $this$bindLeftSyntax, @NotNull kotlin.jvm.functions.Function2<? super tech.codingzen.kata.either.EitherFixedRightSyntax<R>,? super L,? extends tech.codingzen.kata.either.Either<? extends M,? extends R>> fn)
L - left type
R - right type
M - new left type
fn - fn used to transform the left value of this Eitherfn to the left value of this Either. If this Either is a right it is returned
unchanged@NotNull public static <L,R,M> Either<M,R> bindLeft(@NotNull Either<? extends L,? extends R> $this$bindLeft, @NotNull kotlin.jvm.functions.Function1<? super L,? extends tech.codingzen.kata.either.Either<? extends M,? extends R>> fn)
L - left type
R - right type
M - new left type
fn - fn used to transform the left value of this Eitherfn to the left value of this Either. If this Either is a right it is returned
unchanged@NotNull public static <L,R,M> Either<M,R> mapLeft(@NotNull Either<? extends L,? extends R> $this$mapLeft, @NotNull kotlin.jvm.functions.Function1<? super L,? extends M> fn)
L - left type
R - right type
M - new right type
fn - fn used to transform the left value of this Eitherfn to the left value of this Either. If
this Either is a right it is returned unchanged@NotNull public static <L,R> Either<L,R> filterLeft(@NotNull Either<? extends L,? extends R> $this$filterLeft, @NotNull kotlin.jvm.functions.Function1<? super tech.codingzen.kata.either.FilterLeftSyntax<L,R>,kotlin.Unit> body)
L - left type
R - right type
body - used to facilitate a more vertical syntax for the filterLeft operationhandler (defined by body) to the left value that did not pass the filter test@NotNull public static <L,R> Either<L,R> join(@NotNull Either<? extends L,? extends tech.codingzen.kata.either.Either<? extends L,? extends R>> $this$join)
L - left type
R - right type
@JvmName @NotNull public static <L,R> Either<L,R> joinViaLeft(@NotNull Either<? extends tech.codingzen.kata.either.Either<? extends L,? extends R>,? extends R> $this$join)
L - left type
R - right type
@NotNull public static <L,R,S> EitherTryResult<L,R,S> bindTry(@NotNull Either<? extends L,? extends R> $this$bindTry, @NotNull kotlin.jvm.functions.Function2<? super tech.codingzen.kata.either.EitherFixedLeftSyntax<L>,? super R,? extends tech.codingzen.kata.either.Either<? extends L,? extends S>> fn)
L - left type
R - right type
S - new right type
fn - fn used to transform the right value of this Either. This function has a receiver type ofinterface EitherFixedLeftSyntax to provide access to the EitherFixedLeftSyntax.left and EitherFixedLeftSyntax.rightfn to the right value of this Either. If this Either is a left it is returned
unchanged. If during the application of fn an exception is thrown then handler (defined by body) is used
to convert the right value and exception into an Either@NotNull public static <L,R,S> EitherTryResult<L,R,S> mapTry(@NotNull Either<? extends L,? extends R> $this$mapTry, @NotNull kotlin.jvm.functions.Function1<? super R,? extends S> fn)
L - left type
R - right type
S - new right type
fn - fn used to transform the right value of this Eitherfn to the right value of this Either. If this Either is a left it is returned
unchanged. If during the application of fn an exception is thrown then handler (defined by body) is used
to convert the right value and exception into an Either@NotNull public static <L,R,S> Either<L,S> handler(@NotNull EitherTryResult<? extends L,? extends R,? extends S> $this$handler, @NotNull kotlin.jvm.functions.Function3<? super tech.codingzen.kata.either.EitherFixedLeftSyntax<L>,? super R,? super java.lang.Throwable,? extends tech.codingzen.kata.either.Either<? extends L,? extends S>> fn)
L - left type
R - right type
S - new right type
fn - lambda with receiver type of interface EitherFixedLeftSyntax, used to transform the right value and exception into an Eitherfn if this EitherTryResult contains a right value and exception. If this EitherTryResult
contains an Either then that Either is returned unchanged@NotNull public static <L,R> Either<L,java.util.List> sequence(@NotNull java.util.List<? extends tech.codingzen.kata.either.Either<? extends L,? extends R>> $this$sequence)
L - left type
R - right type