Scala Library
|
|
scala/Either.scala
]
object
Either
extends
AnyRefMethod Summary | |
def
|
cond
[A, B](test : Boolean, right : => B, left : => A) : Either[A, B] with Product
If the condition satisfies, return the given A in
Left , otherwise, return the
given B in Right . |
def
|
joinLeft
[A, B](es : Either[Either[A, B], B]) : Either[A, B]
Joins an
Either through Left . |
def
|
joinRight
[A, B](es : Either[A, Either[A, B]]) : Either[A, B]
Joins an
Either through Right . |
def
|
merge
[T](e : Either[T, T]) : T
Takes an
Either to its contained value within Left or
Right . |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
case final class
|
LeftProjection
[+A, +B](val e : Either[A, B]) extends Product
Projects an
Either into a Left . |
case final class
|
RightProjection
[+A, +B](val e : Either[A, B]) extends Product
Projects an
Either into a Right . |
Method Details |
Either
through Left
.Either
through Right
.Either
to its contained value within Left
or
Right
.Left
, otherwise, return the
given B in Right
.
Scala Library
|
|