Package de.scravy.bedrock
Class Either.Left<L,R>
java.lang.Object
de.scravy.bedrock.Either<L,R>
de.scravy.bedrock.Either.Left<L,R>
- All Implemented Interfaces:
Serializable,Comparable<Either<L,R>>
@Immutable public static class Either.Left<L,R> extends Either<L,R>
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class de.scravy.bedrock.Either
Either.Left<L,R>, Either.Right<L,R> -
Constructor Summary
Constructors Constructor Description Left() -
Method Summary
Modifier and Type Method Description intcompareTo(Either<L,R> other)<T> Tfold(Function<L,T> f, Function<R,T> g)voidforEachLeft(Consumer<L> f)voidforEachRight(Consumer<R> f)Optional<Either.Left<L,R>>getLeft()Optional<L>getLeftValue()Optional<Either.Right<L,R>>getRight()Optional<R>getRightValue()booleanisLeft()booleanisRight()<L2> Either<L2,R>mapLeft(Function<L,L2> f)<R2> Either<L,R2>mapRight(Function<R,R2> f)
-
Constructor Details
-
Left
public Left()
-
-
Method Details
-
compareTo
-
mapLeft
-
mapRight
-
forEachLeft
- Specified by:
forEachLeftin classEither<L,R>
-
forEachRight
- Specified by:
forEachRightin classEither<L,R>
-
isLeft
public boolean isLeft() -
isRight
public boolean isRight() -
getLeft
-
getRight
-
getLeftValue
- Specified by:
getLeftValuein classEither<L,R>
-
getRightValue
- Specified by:
getRightValuein classEither<L,R>
-
fold
-