summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-07-13 05:29:13 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-07-13 05:29:13 -0700
commita5539e7f6a5551b2227170cdb704cb72e66c5a24 (patch)
treef49e3e3cffc28e7ec5ce93ffa067f01195f1786d /src
parente5c3d78b5d25a4d5356bf58cd5d3f1d41b55ee12 (diff)
parent31773a248dc685a76f5318e41dde3cac7033e4d2 (diff)
downloadscala-a5539e7f6a5551b2227170cdb704cb72e66c5a24.tar.gz
scala-a5539e7f6a5551b2227170cdb704cb72e66c5a24.tar.bz2
scala-a5539e7f6a5551b2227170cdb704cb72e66c5a24.zip
Merge pull request #892 from xuwei-k/either-scaladoc
fix Right,Left and Either scaladoc links
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/Option.scala8
-rw-r--r--src/library/scala/util/Either.scala12
-rw-r--r--src/library/scala/util/Try.scala2
3 files changed, 11 insertions, 11 deletions
diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala
index c461b413d6..f651461fe6 100644
--- a/src/library/scala/Option.scala
+++ b/src/library/scala/Option.scala
@@ -268,9 +268,9 @@ sealed abstract class Option[+A] extends Product with Serializable {
def toList: List[A] =
if (isEmpty) List() else List(this.get)
- /** Returns a [[scala.Left]] containing the given
+ /** Returns a [[scala.util.Left]] containing the given
* argument `left` if this $option is empty, or
- * a [[scala.Right]] containing this $option's value if
+ * a [[scala.util.Right]] containing this $option's value if
* this is nonempty.
*
* @param left the expression to evaluate and return if this is empty
@@ -279,9 +279,9 @@ sealed abstract class Option[+A] extends Product with Serializable {
@inline final def toRight[X](left: => X) =
if (isEmpty) Left(left) else Right(this.get)
- /** Returns a [[scala.Right]] containing the given
+ /** Returns a [[scala.util.Right]] containing the given
* argument `right` if this is empty, or
- * a [[scala.Left]] containing this $option's value
+ * a [[scala.util.Left]] containing this $option's value
* if this $option is nonempty.
*
* @param right the expression to evaluate and return if this is empty
diff --git a/src/library/scala/util/Either.scala b/src/library/scala/util/Either.scala
index 1a2e2d48d5..dcfdc16d33 100644
--- a/src/library/scala/util/Either.scala
+++ b/src/library/scala/util/Either.scala
@@ -13,12 +13,12 @@ package scala.util
import language.implicitConversions
/** Represents a value of one of two possible types (a disjoint union.)
- * Instances of Either are either an instance of [[scala.Left]] or [[scala.Right]].
+ * Instances of Either are either an instance of [[scala.util.Left]] or [[scala.util.Right]].
*
* A common use of Either is as an alternative to [[scala.Option]] for dealing
* with possible missing values. In this usage, [[scala.None]] is replaced
- * with a [[scala.Left]] which can contain useful information.
- * [[scala.Right]] takes the place of [[scala.Some]]. Convention dictates
+ * with a [[scala.util.Left]] which can contain useful information.
+ * [[scala.util.Right]] takes the place of [[scala.Some]]. Convention dictates
* that Left is used for failure and Right is used for success.
*
* For example, you could use ``Either[String, Int]`` to detect whether a
@@ -181,7 +181,7 @@ sealed abstract class Either[+A, +B] {
}
/**
- * The left side of the disjoint union, as opposed to the [[scala.Right]] side.
+ * The left side of the disjoint union, as opposed to the [[scala.util.Right]] side.
*
* @author <a href="mailto:research@workingmouse.com">Tony Morris</a>, Workingmouse
* @version 1.0, 11/10/2008
@@ -192,7 +192,7 @@ final case class Left[+A, +B](a: A) extends Either[A, B] {
}
/**
- * The right side of the disjoint union, as opposed to the [[scala.Left]] side.
+ * The right side of the disjoint union, as opposed to the [[scala.util.Left]] side.
*
* @author <a href="mailto:research@workingmouse.com">Tony Morris</a>, Workingmouse
* @version 1.0, 11/10/2008
@@ -283,7 +283,7 @@ object Either {
* Right(12).left.get // NoSuchElementException
* }}}
*
- * @throws Predef.NoSuchElementException if the projection is [[scala.Right]]
+ * @throws Predef.NoSuchElementException if the projection is [[scala.util.Right]]
*/
def get = e match {
case Left(a) => a
diff --git a/src/library/scala/util/Try.scala b/src/library/scala/util/Try.scala
index 988f68bc18..9475a05d5a 100644
--- a/src/library/scala/util/Try.scala
+++ b/src/library/scala/util/Try.scala
@@ -16,7 +16,7 @@ import scala.util.control.NonFatal
/**
* The `Try` type represents a computation that may either result in an exception, or return a
- * successfully computed value. It's similar to, but semantically different from the [[scala.Either]] type.
+ * successfully computed value. It's similar to, but semantically different from the [[scala.util.Either]] type.
*
* Instances of `Try[T]`, are either an instance of [[scala.util.Success]][T] or [[scala.util.Failure]][T].
*