public class Either<L,R>
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Either(L left,
R right) |
| Modifier and Type | Method and Description |
|---|---|
protected static java.util.Collection<java.lang.reflect.Type> |
collectDisjoinTypes(java.lang.Class<?> type,
java.util.Collection<java.lang.reflect.Type> types)
Deprecated.
|
protected static java.util.Collection<java.lang.reflect.Type> |
collectDisjoinTypes(java.lang.reflect.ParameterizedType type,
java.util.Collection<java.lang.reflect.Type> types)
Deprecated.
|
protected static java.util.Collection<java.lang.reflect.Type> |
collectDisjoinTypes(java.lang.reflect.Type type,
java.util.Collection<java.lang.reflect.Type> types)
Deprecated.
|
boolean |
equals(java.lang.Object obj) |
static <L,R> Either<L,R> |
forLeft(L left) |
static <L,R> Either<L,R> |
forRight(R right) |
java.lang.Object |
get() |
static java.util.Collection<java.lang.reflect.Type> |
getAllDisjoinTypes(java.lang.reflect.Type type)
Deprecated.
Use
TypeUtils.getExpectedTypes(Type) instead |
L |
getLeft() |
static java.lang.reflect.Type |
getLeftDisjointType(java.lang.reflect.Type type)
Deprecated.
Use
TypeUtils.getElementTypes(Type, Class, Class) instead |
R |
getRight() |
static java.lang.reflect.Type |
getRightDisjointType(java.lang.reflect.Type type)
Deprecated.
Use
TypeUtils.getElementTypes(Type, Class, Class) instead |
int |
hashCode() |
static boolean |
isEither(java.lang.Class<?> cls)
Deprecated.
Use
TypeUtils.isEither(Type) instead |
static boolean |
isEither(java.lang.reflect.ParameterizedType type)
Deprecated.
Use
TypeUtils.isEither(Type) instead |
static boolean |
isEither(java.lang.reflect.Type type)
Deprecated.
Use
TypeUtils.isEither(Type) instead |
boolean |
isLeft() |
boolean |
isRight() |
<T> T |
map(java.util.function.Function<? super L,? extends T> mapLeft,
java.util.function.Function<? super R,? extends T> mapRight) |
java.lang.String |
toString() |
public static <L,R> Either<L,R> forLeft(L left)
public static <L,R> Either<L,R> forRight(R right)
public L getLeft()
public R getRight()
public java.lang.Object get()
public boolean isLeft()
public boolean isRight()
public <T> T map(java.util.function.Function<? super L,? extends T> mapLeft, java.util.function.Function<? super R,? extends T> mapRight)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object@Deprecated public static java.lang.reflect.Type getLeftDisjointType(java.lang.reflect.Type type)
TypeUtils.getElementTypes(Type, Class, Class) instead@Deprecated public static java.lang.reflect.Type getRightDisjointType(java.lang.reflect.Type type)
TypeUtils.getElementTypes(Type, Class, Class) instead@Deprecated public static java.util.Collection<java.lang.reflect.Type> getAllDisjoinTypes(java.lang.reflect.Type type)
TypeUtils.getExpectedTypes(Type) instead@Deprecated
protected static java.util.Collection<java.lang.reflect.Type> collectDisjoinTypes(java.lang.reflect.Type type,
java.util.Collection<java.lang.reflect.Type> types)
@Deprecated
protected static java.util.Collection<java.lang.reflect.Type> collectDisjoinTypes(java.lang.reflect.ParameterizedType type,
java.util.Collection<java.lang.reflect.Type> types)
@Deprecated
protected static java.util.Collection<java.lang.reflect.Type> collectDisjoinTypes(java.lang.Class<?> type,
java.util.Collection<java.lang.reflect.Type> types)
@Deprecated public static boolean isEither(java.lang.reflect.Type type)
TypeUtils.isEither(Type) instead@Deprecated public static boolean isEither(java.lang.reflect.ParameterizedType type)
TypeUtils.isEither(Type) instead@Deprecated public static boolean isEither(java.lang.Class<?> cls)
TypeUtils.isEither(Type) instead