trait Either[L, R] extends Serializable
- Alphabetic
- By Inheritance
- Either
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
get(): R
Gets the right value if this is a
Right
or throws if this is aLeft
.Gets the right value if this is a
Right
or throws if this is aLeft
.Throws NoSuchElementException if this is a
Left
.- returns
the right value
-
abstract
def
getLeft(): L
Returns the left value.
Returns the left value.
Throws NoSuchElementException if this is a
Right
.- returns
The left value.
-
abstract
def
isLeft(): Boolean
Returns whether this Either is a Left.
Returns whether this Either is a Left.
- returns
true, if this is a Left, false otherwise
-
abstract
def
isRight(): Boolean
Returns whether this Either is a Right.
Returns whether this Either is a Right.
- returns
true, if this is a Right, false otherwise
- abstract def stringPrefix(): String
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[U](mapper: Function[_ >: R, _ <: U]): Either[L, U]
Maps the value of this Either if it is a Right, performs no operation if this is a Left.
Maps the value of this Either if it is a Right, performs no operation if this is a Left.
import static io.vavr.API.*; // = Right("A") Right("a").map(String::toUpperCase); // = Left(1) Left(1).map(String::toUpperCase);
Throws NullPointerException if
mapper
is null.- mapper
A mapper
- returns
a mapped
Monad
- Annotations
- @SuppressWarnings()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()