scala

class Left

[source: scala/Left.scala]

case final class Left[+A, +B](val a : A)
extends Either[A, B] with Product
The left side of the disjoint union, as opposed to the Right side.
Author
Tony Morris, Workingmouse
Version
1.0, 11/10/2008
Method Summary
override def equals (arg0 : Any) : Boolean
override def hashCode : Int
override def isLeft : Boolean
Returns true if this is a Left, false otherwise.
override def productArity : Int
return k for a product A(x_1,...,x_k)
override def productElement (arg0 : Int) : Any
for a product A(x_1,...,x_k), returns x_(n+1) for 0 <= n < k
override def productPrefix : java.lang.String
By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.
override def toString : java.lang.String
Methods inherited from Either
left, right, fold, swap, isRight
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def isLeft : Boolean
Returns true if this is a Left, false otherwise.
Overrides
Either.isLeft

override def hashCode : Int

override def toString : java.lang.String

override def equals(arg0 : Any) : Boolean

override def productPrefix : java.lang.String
By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.
Overrides
Product.productPrefix

override def productArity : Int
return k for a product A(x_1,...,x_k)
Overrides
Product.productArity

override def productElement(arg0 : Int) : Any
for a product A(x_1,...,x_k), returns x_(n+1) for 0 <= n < k
Parameters
n - the index of the element to return
Throws
IndexOutOfBoundsException -
Returns
The element n elements after the first element
Overrides
Product.productElement