object Either
- Alphabetic
- By Inheritance
- Either
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
Left[L, R] extends Either[L, R]
A left projected com.swoval.functional.Either.
A left projected com.swoval.functional.Either.
- L
the left type
- R
the right type
-
class
NotLeftException extends RuntimeException
An error that is thrown if an attempt is made to project an Either to com.swoval.functional.Either.Left when the object is actually an instance of com.swoval.functional.Either.Right.
-
class
NotRightException extends RuntimeException
An error that is thrown if an attempt is made to project an Either to com.swoval.functional.Either.Right when the object is actually an instance of com.swoval.functional.Either.Left.
-
class
Right[L, R] extends Either[L, R]
A right projected com.swoval.functional.Either.
A right projected com.swoval.functional.Either.
- L
the left type
- R
the right type
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(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getOrElse[T](either: Either[_, _ <: T], t: T): T
Get the right projected value of the either or a provided default value.
Get the right projected value of the either or a provided default value.
- T
the default type
- either
the either from which the method extracts the result if it is a com.swoval.functional.Either.Right.
- t
the default value
- returns
the wrapped value if this is a right projection, otherwise the default
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
left[L, R, T <: L](value: T): Either[L, R]
Returns a left projected either.
Returns a left projected either.
- L
the type of the left parameter of the result
- R
the type of the right parameter of the result
- T
a refinement type that allows us to wrap subtypes of L
- value
the value to wrap
- returns
A left projected either
-
def
leftProjection[L, R](either: Either[L, R]): Left[L, R]
Returns the Left projection for the provided Either or throws an exception if the Either is actually an instance of com.swoval.functional.Either.Right.
Returns the Left projection for the provided Either or throws an exception if the Either is actually an instance of com.swoval.functional.Either.Right.
- L
the left type of the either.
- R
the right type of the either.
- either
the either, assumed to be an instance of left, that will
- returns
a Left projection.
-
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()
-
def
right[L, R, T <: R](value: T): Either[L, R]
Returns a right projected either.
Returns a right projected either.
- L
the type of the left parameter of the result
- R
the type of the right parameter of the result
- T
a refinement type that allows us to wrap subtypes of R
- value
the value to wrap
- returns
a right projected either.
-
def
rightProjection[L, R](either: Either[L, R]): Right[L, R]
Returns the Right projection for the provided Either or throws an exception if the Either is actually an instance of com.swoval.functional.Either.Left.
Returns the Right projection for the provided Either or throws an exception if the Either is actually an instance of com.swoval.functional.Either.Left.
- L
the left type of the either.
- R
the right type of the either.
- either
the either, assumed to be an instance of left, that will
- returns
a Right projection.
-
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( ... )