cats.data

Ior

sealed abstract class Ior[+A, +B] extends Product with Serializable

Represents a right-biased disjunction that is either an A, or a B, or both an A and a B.

An instance of A Ior B is one of:

A Ior B is similar to A Xor B, except that it can represent the simultaneous presence of an A and a B. It is right-biased like Xor, so methods such as map and flatMap operate on the B value. Some methods, like flatMap, handle the presence of two Both values using a Semigroup[A], while other methods, like toXor, ignore the A value in a Both.

A Ior B is isomorphic to (A Xor B) Xor (A, B), but provides methods biased toward B values, regardless of whether the B values appear in a Right or a Both. The isomorphic Xor form can be accessed via the unwrap method.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Ior
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Ior()

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Definition Classes
    Equals
  2. abstract def productArity: Int

    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any

    Definition Classes
    Product

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def ===[AA >: A, BB >: B](that: Ior[AA, BB])(implicit AA: Eq[AA], BB: Eq[BB]): Boolean

  7. final def append[AA >: A, BB >: B](that: Ior[AA, BB])(implicit AA: Semigroup[AA], BB: Semigroup[BB]): Ior[AA, BB]

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. final def bimap[C, D](fa: (A) ⇒ C, fb: (B) ⇒ D): Ior[C, D]

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. final def exists(p: (B) ⇒ Boolean): Boolean

  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def flatMap[AA >: A, D](f: (B) ⇒ Ior[AA, D])(implicit AA: Semigroup[AA]): Ior[AA, D]

  16. final def fold[C](fa: (A) ⇒ C, fb: (B) ⇒ C, fab: (A, B) ⇒ C): C

  17. final def foldLeft[C](c: C)(f: (C, B) ⇒ C): C

  18. final def foldRight[C](lc: Eval[C])(f: (B, Eval[C]) ⇒ Eval[C]): Eval[C]

  19. final def forall(p: (B) ⇒ Boolean): Boolean

  20. final def foreach(f: (B) ⇒ Unit): Unit

  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. final def getOrElse[BB >: B](bb: ⇒ BB): BB

  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isBoth: Boolean

  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. final def isLeft: Boolean

  27. final def isRight: Boolean

  28. final def left: Option[A]

  29. final def leftMap[C](f: (A) ⇒ C): Ior[C, B]

  30. final def map[D](f: (B) ⇒ D): Ior[A, D]

  31. final def merge[AA >: A](implicit ev: <:<[B, AA], AA: Semigroup[AA]): AA

  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. final def onlyBoth: Option[(A, B)]

  36. final def onlyLeft: Option[A]

  37. final def onlyLeftOrRight: Option[Xor[A, B]]

  38. final def onlyRight: Option[B]

  39. final def pad: (Option[A], Option[B])

  40. def productIterator: Iterator[Any]

    Definition Classes
    Product
  41. def productPrefix: String

    Definition Classes
    Product
  42. final def right: Option[B]

  43. final def show[AA >: A, BB >: B](implicit AA: Show[AA], BB: Show[BB]): String

  44. final def swap: Ior[B, A]

  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. final def to[F[_], BB >: B](implicit monoidKF: MonoidK[F], applicativeF: Applicative[F]): F[BB]

  47. final def toEither: Either[A, B]

  48. final def toList: List[B]

  49. final def toOption: Option[B]

  50. def toString(): String

    Definition Classes
    AnyRef → Any
  51. final def toXor: Xor[A, B]

  52. final def traverse[F[_], AA >: A, D](g: (B) ⇒ F[D])(implicit F: Applicative[F]): F[Ior[AA, D]]

  53. final def unwrap: Xor[Xor[A, B], (A, B)]

  54. final def valueOr[BB >: B](f: (A) ⇒ BB)(implicit BB: Semigroup[BB]): BB

  55. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped