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> Ceither(Function<? super A,? extends C> left, Function<? super B,? extends C> right)Optional<A>fromLeft()Optional<B>fromRight()booleanisLeft()booleanisRight()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()
-
-