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 booleanisLeft()booleanisRight()java.util.Iterator<B>iterator()Aleft()static <A,B>
Either<A,B>left(A a)<R> Rmap(java.util.function.Function<? super B,? extends R> mapper)<R> RmapLeft(java.util.function.Function<? super A,? extends R> mapper)Bright()static <A,B>
Either<A,B>right(B b)java.util.stream.Stream<B>stream()java.lang.StringtoString()
-
-
-
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:
iteratorin interfacejava.lang.Iterable<A>
-
stream
public java.util.stream.Stream<B> stream()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-