class JSEither[L, R] extends AnyRef
Represents a value that can take one of two types. It is right biased, so that the
get and getOrElse correspond to the right value type.
- L
The type of the "left" value
- R
The type of the "right" value
- Annotations
- @JSExportTopLevel( "Either" ) @JSExportAll()
- Alphabetic
- By Inheritance
- JSEither
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
- Definition Classes
- JSEither → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get: R
Return the right value if this JSEither represents a right value.
Return the right value if this JSEither represents a right value. Otherwise throw a com.swoval.functional.Either.NotRightException.
- returns
the right value.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getOrElse[R0 >: R](r: R0): R0
Return the right value or a default if this either represents a left value.
Return the right value or a default if this either represents a left value.
- returns
the right value or a default if this either represents a left value.
-
def
hashCode(): Int
- Definition Classes
- JSEither → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLeft: Boolean
True if the JSEither represents the left value type
-
def
isRight: Boolean
True if the JSEither represents the right value type
-
def
left: JSLeftProjection[L, R]
Projects this either to JSLeftProjection.
Projects this either to JSLeftProjection. This is potentially unsafe to call without checking JSEither.isLeft or JSEither.isRight.
- returns
the JSLeftProjection
-
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
- @native() @throws( ... )