diff options
author | Heather Miller <heather.miller@epfl.ch> | 2012-08-07 18:36:36 +0200 |
---|---|---|
committer | Heather Miller <heather.miller@epfl.ch> | 2012-08-07 18:36:36 +0200 |
commit | ea81ab3314359c98986e6fac74c807fa1accdfb6 (patch) | |
tree | d39d7d549e765af105e1c0808808a8ea5d340037 /src/library/scala/util/Try.scala | |
parent | 505cc713ec4546c5f9be1065e5fa3f7065451b8f (diff) | |
download | scala-ea81ab3314359c98986e6fac74c807fa1accdfb6.tar.gz scala-ea81ab3314359c98986e6fac74c807fa1accdfb6.tar.bz2 scala-ea81ab3314359c98986e6fac74c807fa1accdfb6.zip |
Added tests, removal of unnecessary methods, fixes prepare
Diffstat (limited to 'src/library/scala/util/Try.scala')
-rw-r--r-- | src/library/scala/util/Try.scala | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/library/scala/util/Try.scala b/src/library/scala/util/Try.scala index c834f6d514..f381a18b0c 100644 --- a/src/library/scala/util/Try.scala +++ b/src/library/scala/util/Try.scala @@ -54,7 +54,7 @@ import language.implicitConversions * * `Try` comes to the Scala standard library after years of use as an integral part of Twitter's stack. * - * @author based on Marius Eriksen's original implementation in com.twitter.util. + * @author based on Twitter's original implementation in com.twitter.util. * @since 2.10 */ sealed abstract class Try[+T] { @@ -117,17 +117,6 @@ sealed abstract class Try[+T] { def toOption = if (isSuccess) Some(get) else None /** - * Returns an empty `Seq` (usually a `List`) if this is a `Failure` or a `Seq` containing the value if this is a `Success`. - */ - def toSeq = if (isSuccess) Seq(get) else Seq() - - /** - * Returns the given function applied to the value from this `Success` or returns this if this is a `Failure`. - * Alias for `flatMap`. - */ - def andThen[U](f: T => Try[U]): Try[U] = flatMap(f) - - /** * Transforms a nested `Try`, ie, a `Try` of type `Try[Try[T]]`, * into an un-nested `Try`, ie, a `Try` of type `Try[T]`. */ |