diff options
author | Maks Atygaev <jxcoder@ya.ru> | 2014-07-05 10:23:23 +0700 |
---|---|---|
committer | Antoine Gourlay <antoine@gourlay.fr> | 2014-08-11 17:55:08 +0200 |
commit | 3b7a98911ea67c4e9e2962aeaf6defa029b632bc (patch) | |
tree | 8d00c4c6c04de43d0741d3a0ae3e33a2af46d17f /src/library | |
parent | 1c96ed5a7b5c14c0fed3f9480c4e0fbe9be2b80f (diff) | |
download | scala-3b7a98911ea67c4e9e2962aeaf6defa029b632bc.tar.gz scala-3b7a98911ea67c4e9e2962aeaf6defa029b632bc.tar.bz2 scala-3b7a98911ea67c4e9e2962aeaf6defa029b632bc.zip |
[backport] [scaladoc] Changed align of example code to Option.contains and Option.collect methods.
(cherry picked from commit e3311073bbad6f6f0dfdd3ea09628d324b4b3614)
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Option.scala | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala index 9371775d67..d263f89bb8 100644 --- a/src/library/scala/Option.scala +++ b/src/library/scala/Option.scala @@ -211,16 +211,16 @@ sealed abstract class Option[+A] extends Product with Serializable { /** Tests whether the option contains a given value as an element. * - * @example {{{ - * // Returns true because Some instance contains string "something" which equals "something". - * Some("something") contains "something" + * @example {{{ + * // Returns true because Some instance contains string "something" which equals "something". + * Some("something") contains "something" * - * // Returns false because "something" != "anything". - * Some("something") contains "anything" + * // Returns false because "something" != "anything". + * Some("something") contains "anything" * - * // Returns false when method called on None. - * None contains "anything" - * }}} + * // Returns false when method called on None. + * None contains "anything" + * }}} * * @param elem the element to test. * @return `true` if the option has an element that is equal (as @@ -262,16 +262,16 @@ sealed abstract class Option[+A] extends Product with Serializable { * nonempty '''and''' `pf` is defined for that value. * Returns $none otherwise. * - * @example {{{ - * // Returns Some(HTTP) because the partial function covers the case. - * Some("http").collect({case "http" => "HTTP"}) + * @example {{{ + * // Returns Some(HTTP) because the partial function covers the case. + * Some("http").collect({case "http" => "HTTP"}) * - * // Returns None because the partial function doesn't cover the case. - * Some("ftp").collect({case "http" => "HTTP"}) + * // Returns None because the partial function doesn't cover the case. + * Some("ftp").collect({case "http" => "HTTP"}) * - * // Returns None because None is passed to the collect method. - * None.collect({case value => value}) - * }}} + * // Returns None because None is passed to the collect method. + * None.collect({case value => value}) + * }}} * * @param pf the partial function. * @return the result of applying `pf` to this $option's |