Package org.kie.dmn.feel.util
Class Either<L,R>
- java.lang.Object
-
- org.kie.dmn.feel.util.Either<L,R>
-
- Direct Known Subclasses:
FEELFnResult
public class Either<L,R> extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> Xcata(Function<L,X> left, Function<R,X> right)voidconsume(Consumer<L> leftConsumer, Consumer<R> rightConsumer)protected Optional<L>getLeft()RgetOrElse(R default_value)<E extends Exception>
RgetOrElseThrow(Function<L,E> exceptionFn)protected Optional<R>getRight()booleanisLeft()booleanisRight()static <L,R>
Either<L,R>ofLeft(L value)static <L,R>
Either<L,R>ofRight(R value)
-
-
-
Method Detail
-
ofLeft
public static <L,R> Either<L,R> ofLeft(L value)
-
ofRight
public static <L,R> Either<L,R> ofRight(R value)
-
isLeft
public boolean isLeft()
-
isRight
public boolean isRight()
-
getOrElseThrow
public <E extends Exception> R getOrElseThrow(Function<L,E> exceptionFn) throws E extends Exception
- Throws:
E extends Exception
-
-