Package hiiragi283.core.api.util
Class Either
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classEither.Leftpublic final classEither.Right
-
Method Summary
Modifier and Type Method Description final BooleanisLeft()このインスタンスがLeftであるか判定します。 final BooleanisRight()このインスタンスがRightであるか判定します。 final <C extends Any> Cmap(Function1<A, C> left, Function1<B, C> right)保持している値を変換します。 final <C extends Any> Either<A, C>mapRight(Function1<B, C> right)保持している値を変換します。 final <C extends Any> Either<C, B>mapLeft(Function1<A, C> left)保持している値を変換します。 final Either<B, A>swap()保持している値を入れ替えます。 final Pair<A, B>toPair()保持している値をPairに展開します。 final BgetRight()右側の値を取得します。 final AgetLeft()左側の値を取得します。
-