Package owl.collections
Class Either<A,B>
- java.lang.Object
-
- owl.collections.Either<A,B>
-
public abstract class Either<A,B> extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <C> C
either(Function<? super A,? extends C> left, Function<? super B,? extends C> right)
Optional<A>
fromLeft()
Optional<B>
fromRight()
boolean
isLeft()
boolean
isRight()
static <A,B>
Either<A,B>left(A value)
static <A,B>
Either<A,B>right(B value)
-
-
-
Method Detail
-
either
public abstract <C> C either(Function<? super A,? extends C> left, Function<? super B,? extends C> right)
-
left
public static <A,B> Either<A,B> left(A value)
-
right
public static <A,B> Either<A,B> right(B value)
-
isLeft
public boolean isLeft()
-
isRight
public boolean isRight()
-
-