Packages

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()
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JSEither
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JSEither(either: Either[L, R])

    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(other: Any): Boolean
    Definition Classes
    JSEither → AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. 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.

  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. 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.

  12. def hashCode(): Int
    Definition Classes
    JSEither → AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def isLeft: Boolean

    True if the JSEither represents the left value type

    True if the JSEither represents the left value type

    returns

    true if the JSEither represents the left value type

  15. def isRight: Boolean

    True if the JSEither represents the right value type

    True if the JSEither represents the right value type

    returns

    true if the JSEither represents the right value type

  16. 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

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped