Uses of Interface
cloud.opencode.base.functional.monad.Either
Packages that use Either
Package
Description
OpenCode Functional - Functional Programming Utilities for JDK 25+
OpenCode 函数式编程工具库
Monad Types - Functional containers for computation
Monad 类型 - 计算的函数式容器
-
Uses of Either in cloud.opencode.base.functional
Methods in cloud.opencode.base.functional that return Either -
Uses of Either in cloud.opencode.base.functional.monad
Classes in cloud.opencode.base.functional.monad that implement EitherModifier and TypeClassDescriptionstatic final classEither.Left<L,R> Left - Represents the left case (typically error) Left - 表示左情况(通常为错误)static final classEither.Right<L,R> Right - Represents the right case (typically success) Right - 表示右情况(通常为成功)Methods in cloud.opencode.base.functional.monad that return EitherModifier and TypeMethodDescription<L2,R2> Either <L2, R2> Either.bimap(Function<? super L, ? extends L2> leftMapper, Function<? super R, ? extends R2> rightMapper) Transform both sides 转换两侧的值<L2,R2> Either <L2, R2> Either.Left.bimap(Function<? super L, ? extends L2> leftMapper, Function<? super R, ? extends R2> rightMapper) <L2,R2> Either <L2, R2> Either.Right.bimap(Function<? super L, ? extends L2> leftMapper, Function<? super R, ? extends R2> rightMapper) Either.filterOrElse(Predicate<? super R> predicate, Supplier<? extends L> orElse) Filter the Right value with a predicate, converting to Left if it fails.Transform the Right value to another Either 将 Right 值转换为另一个 Eitherstatic <L,R> Either <L, R> Either.left(L value) Create a Left Either 创建 Left EitherTransform the Right value 转换 Right 值Transform the Left value 转换 Left 值Return this or other Either if Left 返回本 Either 或其他 Either(如果是 Left)Execute action on Right value 对 Right 值执行操作Execute action on Left value 对 Left 值执行操作static <L,R> Either <L, R> Either.right(R value) Create a Right Either 创建 Right EitherEither.Left.swap()Either.Right.swap()Either.swap()Swap Left and Right 交换 Left 和 RightOption.None.toEither(L left) Option.Some.toEither(L left) Option.toEither(L left) Convert to Either (None becomes Left) 转换为 Either(None 变为 Left)Try.Failure.toEither()Try.Success.toEither()Try.toEither()Convert to Either (Left=exception, Right=value) 转换为 Either(Left=异常,Right=值)Validation.Invalid.toEither()Validation.toEither()Convert to Either (errors as Left, value as Right) 转换为 Either(错误为 Left,值为 Right)Validation.Valid.toEither()Methods in cloud.opencode.base.functional.monad with parameters of type EitherModifier and TypeMethodDescriptionReturn this or other Either if Left 返回本 Either 或其他 Either(如果是 Left)Method parameters in cloud.opencode.base.functional.monad with type arguments of type EitherModifier and TypeMethodDescriptionTransform the Right value to another Either 将 Right 值转换为另一个 Either