L - The type for the Left sideR - The type for the Right side (not used for this class)public final class Left<L,R> extends Object implements Either<L,R>, Serializable
| Constructor and Description |
|---|
Left(L value)
Creates an instance wrapping the provide value.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
fold(java.util.function.Function<L,T> func_left,
java.util.function.Function<R,T> func_right)
Applies the provided
func_left to the wrapped value and returns the result. |
boolean |
isRight()
Always returns
false. |
Either<R,L> |
swap()
Returns a
Right containing the value for this instance. |
String |
toString() |
public Left(L value)
value - The value wrapped by this instancepublic <T> T fold(java.util.function.Function<L,T> func_left, java.util.function.Function<R,T> func_right)
func_left to the wrapped value and returns the result.fold in interface Either<L,R>T - The type to return from func_left/func_rightfunc_left - The function to apply in case this is a Leftfunc_right - The function to apply in case this is a Rightpublic boolean isRight()
false.Copyright © 2015. All rights reserved.