Package org.openqa.selenium.internal
Class Either<A,B>
- java.lang.Object
-
- org.openqa.selenium.internal.Either<A,B>
-
- All Implemented Interfaces:
java.lang.Iterable<B>
public class Either<A,B> extends java.lang.Object implements java.lang.Iterable<B>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLeft()
boolean
isRight()
java.util.Iterator<B>
iterator()
A
left()
static <A,B>
Either<A,B>left(A a)
<R> R
map(java.util.function.Function<? super B,? extends R> mapper)
<R> R
mapLeft(java.util.function.Function<? super A,? extends R> mapper)
B
right()
static <A,B>
Either<A,B>right(B b)
java.util.stream.Stream<B>
stream()
-
-
-
Method Detail
-
left
public static <A,B> Either<A,B> left(A a)
-
right
public static <A,B> Either<A,B> right(B b)
-
isLeft
public boolean isLeft()
-
isRight
public boolean isRight()
-
left
public A left()
-
right
public B right()
-
map
public <R> R map(java.util.function.Function<? super B,? extends R> mapper)
-
mapLeft
public <R> R mapLeft(java.util.function.Function<? super A,? extends R> mapper)
-
iterator
public java.util.Iterator<B> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<A>
-
stream
public java.util.stream.Stream<B> stream()
-
-