diff options
author | Maks Atygaev <jxcoder@ya.ru> | 2014-07-05 10:23:23 +0700 |
---|---|---|
committer | Maks Atygaev <jxcoder@ya.ru> | 2014-07-05 10:23:23 +0700 |
commit | e3311073bbad6f6f0dfdd3ea09628d324b4b3614 (patch) | |
tree | f48934bd259725ca43a0139b2fd9d302034f3dbb /src/library | |
parent | 1e2a21681a4a55469faa59b07473a3b269e70258 (diff) | |
download | scala-e3311073bbad6f6f0dfdd3ea09628d324b4b3614.tar.gz scala-e3311073bbad6f6f0dfdd3ea09628d324b4b3614.tar.bz2 scala-e3311073bbad6f6f0dfdd3ea09628d324b4b3614.zip |
[scaladoc] Changed align of example code to Option.contains and Option.collect methods.
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 |