Packages

c

cats.syntax

EitherObjectOps

final class EitherObjectOps extends AnyVal

Source
either.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EitherObjectOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EitherObjectOps(either: Either.type)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def catchNonFatal[A](f: ⇒ A): Either[Throwable, A]
  6. def catchOnly[T >: Null <: Throwable]: CatchOnlyPartiallyApplied[T]

    Evaluates the specified block, catching exceptions of the specified type and returning them on the left side of the resulting Either.

    Evaluates the specified block, catching exceptions of the specified type and returning them on the left side of the resulting Either. Uncaught exceptions are propagated.

    For example:

    scala> import cats.implicits._ // get syntax for Either
    scala> Either.catchOnly[NumberFormatException] { "foo".toInt }
    res0: Either[NumberFormatException, Int] = Left(java.lang.NumberFormatException: For input string: "foo")
  7. def fromOption[A, B](o: Option[B], ifNone: ⇒ A): Either[A, B]

    Converts an Option[B] to an Either[A, B], where the provided ifNone values is returned on the left of the Either when the specified Option is None.

  8. def fromTry[A](t: Try[A]): Either[Throwable, A]

    Converts a Try[A] to a Either[Throwable, A].

  9. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. def left[A, B](a: A): Either[A, B]
  12. def leftNec[A, B](a: A): EitherNec[A, B]
  13. def leftNel[A, B](a: A): EitherNel[A, B]
  14. def leftNes[A, B](a: A)(implicit O: Order[A]): EitherNes[A, B]
  15. def right[A, B](b: B): Either[A, B]
  16. def rightNec[A, B](b: B): EitherNec[A, B]
  17. def rightNel[A, B](b: B): EitherNel[A, B]
  18. def rightNes[A, B](b: B)(implicit O: Order[B]): EitherNes[A, B]
  19. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped