Packages

c

scala.util.Either

MergeableEither

implicit final class MergeableEither[A] extends AnyVal

Allows use of a merge method to extract values from Either instances regardless of whether they are Left or Right.

val l = Left(List(1)): Either[List[Int], Vector[Int]]
val r = Right(Vector(1)): Either[List[Int], Vector[Int]]
l.merge: Seq[Int] // List(1)
r.merge: Seq[Int] // Vector(1)
Source
Either.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MergeableEither
  2. AnyVal
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MergeableEither(x: Either[A, A])

Value Members

  1. def getClass(): Class[_ <: AnyVal]

    Returns the runtime class representation of the object.

    Returns the runtime class representation of the object.

    returns

    a class object corresponding to the runtime type of the receiver.

    Definition Classes
    AnyValAny
  2. def merge: A