Packages

  • package root
    Definition Classes
    root
  • package cats

    The cats root package contains all the trait signatures of most Scala type classes.

    The cats root package contains all the trait signatures of most Scala type classes.

    Cats type classes are implemented using the approach from the Type classes as objects and implicits article.

    For each type class, cats provides three pieces: - Its signature: a trait that is polymorphic on a type parameter. Type class traits inherit from other type classes to indicate that any implementation of the lower type class (e.g. Applicative) can also serve as an instance for the higuer type class (e.g. Functor). - Type class 'instances, which are classes and objects that implement one or more type class signatures for some specific types. Type class instances for several data types from the Java or Scala standard libraries are declared in the subpackage cats.instances. - Syntax extensions, each of which provides the methods of the type class defines as extension methods (which in Scala 2 are encoded as implicit classes) for values of any type F; given that an instance of the type class for the receiver type (this) is in the implicit scope. Symtax extensions are declared in the cats.syntax package. - A set of laws, that are also generic on the type of the class, and are only defined on the operations of the type class. The purpose of these laws is to declare some algebraic relations (equations) between Scala expressions involving the operations of the type class, and test (but not verify) that implemented instances satisfy those equations. Laws are defined in the cats-laws package.

    Although most of cats type classes are declared in this package, some are declared in other packages: - type classes that operate on base types (kind *), and their implementations for standard library types, are contained in cats.kernel, which is a different SBT project. However, they are re-exported from this package. - type classes of kind F[_, _], such as cats.arrow.Profunctor" or cats.arrow.Arrow, which are relevant for Functional Reactive Programming or optics, are declared in the cats.arrow package. - Also, those type classes that abstract over (pure or impure) functional runtime effects are declared in the cats-effect library. - Some type classes for which no laws can be provided are left out of the main road, in a small and dirty alley. These are the alleycats.

    Definition Classes
    root
  • package data
    Definition Classes
    cats
  • object Ior extends IorInstances with IorFunctions with IorFunctions2 with Serializable
    Definition Classes
    data
  • Both
  • Left
  • Right
c

cats.data.Ior

Right

final case class Right[+B](b: B) extends Ior[Nothing, B] with Product with Serializable

Source
Ior.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Right
  2. Ior
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Right(b: B)

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 ===[AA >: Nothing, BB >: B](that: Ior[AA, BB])(implicit AA: Eq[AA], BB: Eq[BB]): Boolean
    Definition Classes
    Ior
  5. final def addLeft[AA >: Nothing](left: AA)(implicit AA: Semigroup[AA]): Ior[AA, B]

    When a Left value is present in the Ior, combine it will the value specified.

    When a Left value is present in the Ior, combine it will the value specified.

    When the Left value is absent, set it to the value specified.

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> val ior1 = "abc".leftIor[Int]
    scala> ior1.addLeft("def")
    res0: Ior[String, Int] = Left(abcdef)
    
    scala> val ior2 = 123.rightIor[String]
    scala> ior2.addLeft("abc")
    res1: cats.data.Ior[String,Int] = Both(abc,123)
    
    scala> val ior3 = Ior.Both("abc",123)
    scala> ior3.addLeft("def")
    res2: Ior[String, Int] = Both(abcdef,123)
    Definition Classes
    Ior
  6. final def addRight[BB >: B](right: BB)(implicit BB: Semigroup[BB]): Ior[Nothing, BB]

    When a Right value is present in the Ior, combine it will the value specified.

    When a Right value is present in the Ior, combine it will the value specified.

    When the Right value is absent, set it to the value specified.

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> val ior1 = "abc".leftIor[Int]
    scala> ior1.addRight(123)
    res0: Ior[String, Int] = Both(abc,123)
    
    scala> val ior2 = 123.rightIor[String]
    scala> ior2.addRight(123)
    res1: Ior[String, Int] = Right(246)
    
    scala> val ior3 = Ior.Both("abc",123)
    scala> ior3.addRight(123)
    res2: Ior[String, Int] = Both(abc,246)
    Definition Classes
    Ior
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. val b: B
  9. final def bimap[C, D](fa: (Nothing) ⇒ C, fb: (B) ⇒ D): Ior[C, D]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].bimap(_.length, identity)
    res0: Ior[Int, Int] = Left(3)
    
    scala> 123.rightIor[String].bimap(_.length, identity)
    res1: Ior[Int, Int] = Right(123)
    
    scala> Ior.Both("abc", 123).bimap(_.length, identity)
    res2: Ior[Int, Int] = Both(3,123)
    Definition Classes
    Ior
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  11. final def combine[AA >: Nothing, BB >: B](that: Ior[AA, BB])(implicit AA: Semigroup[AA], BB: Semigroup[BB]): Ior[AA, BB]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].combine("other".leftIor[Int])
    res0: Ior[String, Int] = Left(abcother)
    
    scala> "abc".leftIor[Int].combine(456.rightIor[String])
    res1: Ior[String, Int] = Both(abc,456)
    
    scala> 123.rightIor[String].combine("other".leftIor[Int])
    res2: Ior[String, Int] = Both(other,123)
    
    scala> Ior.Both("abc", 123).combine(Ior.Both("other",456))
    res3: Ior[String, Int] = Both(abcother,579)
    
    scala> Ior.Both("abc", 123).combine("other".leftIor[Int])
    res3: Ior[String, Int] = Both(abcother,123)
    
    scala> Ior.Both("abc", 123).combine(456.rightIor[String])
    res3: Ior[String, Int] = Both(abc,579)
    Definition Classes
    Ior
  12. final def compare[AA >: Nothing, BB >: B](that: Ior[AA, BB])(implicit AA: Order[AA], BB: Order[BB]): Int
    Definition Classes
    Ior
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def exists(p: (B) ⇒ Boolean): Boolean

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].exists(_ > 100)
    res0: Boolean = false
    
    scala> 123.rightIor[String].exists(_ > 100)
    res1: Boolean = true
    
    scala> Ior.Both("abc", 123).exists(_ > 100)
    res2: Boolean = true
    Definition Classes
    Ior
  15. final def flatMap[AA >: Nothing, D](f: (B) ⇒ Ior[AA, D])(implicit AA: Semigroup[AA]): Ior[AA, D]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].flatMap(i => 456.rightIor[String])
    res0: Ior[String, Int] = Left(abc)
    
    scala> 123.rightIor[String].flatMap(i => (i * 2).rightIor[String])
    res1: Ior[String, Int] = Right(246)
    
    scala> 123.rightIor[String].flatMap(_ => "error".leftIor[Int])
    res2: Ior[String, Int] = Left(error)
    
    scala> Ior.Both("abc", 123).flatMap(_ => 456.rightIor[String])
    res3: Ior[String, Int] = Both(abc,456)
    
    scala> Ior.Both("abc", 123).flatMap(_ => "error".leftIor[Int])
    res4: Ior[String, Int] = Left(abcerror)
    
    scala> Ior.Both("abc", 123).flatMap(_ => Ior.Both("error",456))
    res5: Ior[String, Int] = Both(abcerror,456)
    Definition Classes
    Ior
  16. final def fold[C](fa: (Nothing) ⇒ C, fb: (B) ⇒ C, fab: (Nothing, B) ⇒ C): C

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> val rightF: Int => String = _.show
    scala> val bothF: (String,Int) => String = (a,b) => a.combine(b.show)
    
    scala> val ior1 = "abc".leftIor[Int]
    scala> ior1.fold(identity, rightF, bothF)
    res0: String = abc
    
    scala> val ior2 = 123.rightIor[String]
    scala> ior2.fold(identity, rightF, bothF)
    res1: String = 123
    
    scala> val ior3 = Ior.Both("abc", 123)
    scala> ior3.fold(identity, rightF, bothF)
    res2: String = abc123
    Definition Classes
    Ior
  17. final def foldLeft[C](c: C)(f: (C, B) ⇒ C): C

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].foldLeft(List(456))((c,b) => b :: c)
    res0: List[Int] = List(456)
    
    scala> 123.rightIor[String].foldLeft(List(456))((c,b) => b :: c)
    res1: List[Int] = List(123, 456)
    
    scala> Ior.Both("abc", 123).foldLeft(List(456))((c,b) => b :: c)
    res2: List[Int] = List(123, 456)
    Definition Classes
    Ior
  18. final def foldRight[C](lc: Eval[C])(f: (B, Eval[C]) ⇒ Eval[C]): Eval[C]
    Definition Classes
    Ior
  19. final def forall(p: (B) ⇒ Boolean): Boolean

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].forall(_ > 100)
    res0: Boolean = true
    
    scala> 123.rightIor[String].forall(_ > 150)
    res1: Boolean = false
    
    scala> Ior.Both("abc", 123).forall(_ > 100)
    res2: Boolean = true
    Definition Classes
    Ior
  20. final def foreach(f: (B) ⇒ Unit): Unit

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    // Nothing to show
    scala> "abc".leftIor[Int].foreach(println)
    res0: Unit = ()
    
    // 123 to be shown
    scala> 123.rightIor[String].foreach(println)
    res1: Unit = ()
    
    123 to be shown
    scala> Ior.both("abc", 123).foreach(println)
    res2: Unit = ()
    Definition Classes
    Ior
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  22. final def getOrElse[BB >: B](bb: ⇒ BB): BB

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].getOrElse(456)
    res0: Int = 456
    
    scala> 123.rightIor[String].getOrElse(456)
    res1: Int = 123
    
    scala> Ior.Both("abc", 123).getOrElse(456)
    res2: Int = 123
    Definition Classes
    Ior
  23. final def isBoth: Boolean
    Definition Classes
    Ior
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. final def isLeft: Boolean

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].isLeft
    res0: Boolean = true
    
    scala> 123.rightIor[String].isLeft
    res1: Boolean = false
    
    scala> Ior.Both("abc", 123).isLeft
    res2: Boolean = false
    Definition Classes
    Ior
  26. final def isRight: Boolean
    Definition Classes
    Ior
  27. final def left: Option[Nothing]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].left
    res0: Option[String] = Some(abc)
    
    scala> 123.rightIor[String].left
    res1: Option[String] = None
    
    scala> Ior.Both("abc", 123).left
    res2: Option[String] = Some(abc)
    Definition Classes
    Ior
  28. final def leftMap[C](f: (Nothing) ⇒ C): Ior[C, B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].leftMap(_.length)
    res0: Ior[Int, Int] = Left(3)
    
    scala> 123.rightIor[String].leftMap(_.length)
    res1: Ior[Int, Int] = Right(123)
    
    scala> Ior.Both("abc", 123).leftMap(_.length)
    res2: Ior[Int, Int] = Both(3,123)
    Definition Classes
    Ior
  29. final def map[D](f: (B) ⇒ D): Ior[Nothing, D]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].map(_ * 2)
    res0: Ior[String, Int] = Left(abc)
    
    scala> 123.rightIor[String].map(_ * 2)
    res1: Ior[String, Int] = Right(246)
    
    scala> Ior.Both("abc", 123).map(_ * 2)
    res2: Ior[String, Int] = Both(abc,246)
    Definition Classes
    Ior
  30. final def merge[AA >: Nothing](implicit ev: <:<[B, AA], AA: Semigroup[AA]): AA
    Definition Classes
    Ior
  31. final def mergeLeft[AA >: Nothing](implicit ev: <:<[B, AA]): AA
    Definition Classes
    Ior
  32. final def mergeRight[AA >: Nothing](implicit ev: <:<[B, AA]): AA
    Definition Classes
    Ior
  33. final def mergeWith[AA >: Nothing](f: (Nothing, B) ⇒ AA)(implicit ev: <:<[B, AA]): AA
    Definition Classes
    Ior
  34. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  35. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  36. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  37. final def onlyBoth: Option[(Nothing, B)]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].onlyBoth
    res0: Option[(String, Int)] = None
    
    scala> 123.rightIor[String].onlyBoth
    res1: Option[(String, Int)] = None
    
    scala> Ior.Both("abc", 123).onlyBoth
    res2: Option[(String, Int)] = Some((abc,123))
    Definition Classes
    Ior
  38. final def onlyLeft: Option[Nothing]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].onlyLeft
    res0: Option[String] = Some(abc)
    
    scala> 123.rightIor[String].onlyLeft
    res1: Option[String] = None
    
    scala> Ior.Both("abc", 123).onlyLeft
    res2: Option[String] = None
    Definition Classes
    Ior
  39. final def onlyLeftOrRight: Option[Either[Nothing, B]]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].onlyLeftOrRight
    res0: Option[Either[String, Int]] = Some(Left(abc))
    
    scala> 123.rightIor[String].onlyLeftOrRight
    res1: Option[Either[String, Int]] = Some(Right(123))
    
    scala> Ior.Both("abc", 123).onlyLeftOrRight
    res2: Option[Either[String, Int]] = None
    Definition Classes
    Ior
  40. final def onlyRight: Option[B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].onlyRight
    res0: Option[Int] = None
    
    scala> 123.rightIor[String].onlyRight
    res1: Option[Int] = Some(123)
    
    scala> Ior.Both("abc", 123).onlyRight
    res2: Option[Int] = None
    Definition Classes
    Ior
  41. final def pad: (Option[Nothing], Option[B])

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].pad
    res0: (Option[String], Option[Int]) = (Some(abc),None)
    
    scala> 123.rightIor[String].pad
    res1: (Option[String], Option[Int]) = (None,Some(123))
    
    scala> Ior.Both("abc", 123).pad
    res2: (Option[String], Option[Int]) = (Some(abc),Some(123))
    Definition Classes
    Ior
  42. final def putLeft[C](left: C): Ior[C, B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> val ior1 = "abc".leftIor[Int]
    scala> ior1.putLeft(true)
    res0: Ior[Boolean, Int] = Left(true)
    
    scala> val ior2 = 123.rightIor[String]
    scala> ior2.putLeft(false)
    res1: Ior[Boolean, Int] = Both(false,123)
    
    scala> val ior3 = Ior.Both("abc",123)
    scala> ior3.putLeft(true)
    res2: Ior[Boolean, Int] = Both(true,123)
    Definition Classes
    Ior
  43. final def putRight[C](right: C): Ior[Nothing, C]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> val ior1 = "abc".leftIor[Int]
    scala> ior1.putRight(123L)
    res0: Ior[String, Long] = Both(abc,123)
    
    scala> val ior2 = 123.rightIor[String]
    scala> ior2.putRight(123L)
    res1: Ior[String, Long] = Right(123)
    
    scala> val ior3 = Ior.Both("abc",123)
    scala> ior3.putRight(123L)
    res2: Ior[String, Long] = Both(abc,123)
    Definition Classes
    Ior
  44. final def right: Option[B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].right
    res0: Option[Int] = None
    
    scala> 123.rightIor[String].right
    res1: Option[Int] = Some(123)
    
    scala> Ior.Both("abc", 123).right
    res2: Option[Int] = Some(123)
    Definition Classes
    Ior
  45. final def show[AA >: Nothing, BB >: B](implicit AA: Show[AA], BB: Show[BB]): String
    Definition Classes
    Ior
  46. final def swap: Ior[B, Nothing]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].swap
    res0: Ior[Int, String] = Right(abc)
    
    scala> 123.rightIor[String].swap
    res1: Ior[Int, String] = Left(123)
    
    scala> Ior.Both("abc", 123).swap
    res2: Ior[Int, String] = Both(123,abc)
    Definition Classes
    Ior
  47. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  48. final def to[F[_], BB >: B](implicit F: Alternative[F]): F[BB]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].to[List, Int]
    res0: List[Int] = List()
    
    scala> 123.rightIor[String].to[List, Int]
    res1: List[Int]= List(123)
    
    scala> Ior.Both("abc", 123).to[List, Int]
    res2: List[Int] = List(123)
    Definition Classes
    Ior
  49. final def toEither: Either[Nothing, B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].toEither
    res0: Either[String, Int] = Left(abc)
    
    scala> 123.rightIor[String].toEither
    res1: Either[String, Int]= Right(123)
    
    scala> Ior.Both("abc", 123).toEither
    res2: Either[String, Int] = Right(123)
    Definition Classes
    Ior
  50. final def toIorNec[AA >: Nothing]: IorNec[AA, B]
    Definition Classes
    Ior
  51. final def toIorNel[AA >: Nothing]: IorNel[AA, B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].toIorNel
    res0: IorNel[String, Int] = Left(NonEmptyList(abc))
    
    scala> 123.rightIor[String].toIorNel
    res1: IorNel[String, Int]= Right(123)
    
    scala> Ior.Both("abc", 123).toIorNel
    res2: IorNel[String, Int] = Both(NonEmptyList(abc),123)
    Definition Classes
    Ior
  52. final def toIorNes[AA >: Nothing](implicit O: Order[AA]): IorNes[AA, B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].toIorNes
    res0: IorNes[String, Int] = Left(TreeSet(abc))
    
    scala> 123.rightIor[String].toIorNes
    res1: IorNes[String, Int]= Right(123)
    
    scala> Ior.Both("abc", 123).toIorNes
    res2: IorNes[String, Int] = Both(TreeSet(abc),123)
    Definition Classes
    Ior
  53. final def toList: List[B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].toList
    res0: List[Int] = List()
    
    scala> 123.rightIor[String].toList
    res1: List[Int]= List(123)
    
    scala> Ior.Both("abc", 123).toList
    res2: List[Int] = List(123)
    Definition Classes
    Ior
  54. final def toOption: Option[B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].toOption
    res0: Option[Int] = None
    
    scala> 123.rightIor[String].toOption
    res1: Option[Int]= Some(123)
    
    scala> Ior.Both("abc", 123).toOption
    res2: Option[Int] = Some(123)
    Definition Classes
    Ior
  55. final def toValidated: Validated[Nothing, B]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].toValidated
    res0: Validated[String, Int] = Invalid(abc)
    
    scala> 123.rightIor[String].toValidated
    res1: Validated[String, Int]= Valid(123)
    
    scala> Ior.Both("abc", 123).toValidated
    res2: Validated[String, Int] = Valid(123)
    Definition Classes
    Ior
  56. final def traverse[F[_], AA >: Nothing, D](g: (B) ⇒ F[D])(implicit F: Applicative[F]): F[Ior[AA, D]]

    Example

    Example

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].traverse(i => List(i, i * 2))
    res0: List[Ior[String,Int]] = List(Left(abc))
    
    scala> 123.rightIor[String].traverse(i => List(i, i * 2))
    res1: List[Ior[String,Int]] = List(Right(123), Right(246))
    
    scala> Ior.both("abc", 123).traverse(i => List(i, i * 2))
    res2: List[Ior[String,Int]] = List(Both(abc,123), Both(abc,246))
    Definition Classes
    Ior
  57. final def unwrap: Either[Either[Nothing, B], (Nothing, B)]

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].unwrap
    res0: Either[Either[String, Int], (String, Int)] = Left(Left(abc))
    
    scala> 123.rightIor[String].unwrap
    res1: Either[Either[String, Int], (String, Int)] = Left(Right(123))
    
    scala> Ior.Both("abc", 123).unwrap
    res2: Either[Either[String, Int], (String, Int)] = Right((abc,123))
    Definition Classes
    Ior
  58. final def valueOr[BB >: B](f: (Nothing) ⇒ BB)(implicit BB: Semigroup[BB]): BB

    Example:

    Example:

    scala> import cats.data.Ior
    scala> import cats.implicits._
    
    scala> "abc".leftIor[Int].valueOr(_.length)
    res0: Int = 3
    
    scala> 123.rightIor[String].valueOr(_.length)
    res1: Int = 123
    
    scala> Ior.Both("abc", 123).valueOr(_.length)
    res2: Int = 126
    Definition Classes
    Ior
  59. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  61. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Ior[Nothing, B]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped