summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
Diffstat (limited to 'src/library')
-rwxr-xr-xsrc/library/scala/collection/JavaConverters.scala55
-rw-r--r--src/library/scala/collection/MapProxy.scala5
-rw-r--r--src/library/scala/collection/SeqLike.scala7
-rw-r--r--src/library/scala/collection/SetProxy.scala6
-rw-r--r--src/library/scala/collection/generic/Sorted.scala15
-rw-r--r--src/library/scala/collection/immutable/ListMap.scala14
-rw-r--r--src/library/scala/collection/immutable/ListSet.scala13
-rw-r--r--src/library/scala/collection/immutable/Stream.scala95
-rw-r--r--src/library/scala/collection/mutable/ArrayStack.scala7
-rw-r--r--src/library/scala/collection/mutable/BufferProxy.scala5
-rw-r--r--src/library/scala/collection/mutable/ListBuffer.scala2
-rw-r--r--src/library/scala/collection/mutable/StackProxy.scala15
-rw-r--r--src/library/scala/collection/mutable/SynchronizedBuffer.scala27
-rw-r--r--src/library/scala/collection/script/Message.scala13
-rw-r--r--src/library/scala/concurrent/FutureTaskRunner.scala10
-rw-r--r--src/library/scala/concurrent/MailBox.scala6
-rw-r--r--src/library/scala/concurrent/SyncChannel.scala9
-rw-r--r--src/library/scala/concurrent/TIMEOUT.scala4
-rw-r--r--src/library/scala/concurrent/TaskRunner.scala4
-rw-r--r--src/library/scala/concurrent/TaskRunners.scala4
-rw-r--r--src/library/scala/concurrent/ThreadPoolRunner.scala5
-rw-r--r--src/library/scala/concurrent/ThreadRunner.scala4
-rw-r--r--src/library/scala/concurrent/pilib.scala2
-rw-r--r--src/library/scala/io/Source.scala34
-rw-r--r--src/library/scala/math/BigInt.scala34
-rw-r--r--src/library/scala/math/PartialOrdering.scala71
-rw-r--r--src/library/scala/math/PartiallyOrdered.scala12
-rw-r--r--src/library/scala/math/package.scala8
-rw-r--r--src/library/scala/ref/Reference.scala5
-rw-r--r--src/library/scala/reflect/BeanProperty.scala7
-rwxr-xr-xsrc/library/scala/reflect/NameTransformer.scala4
-rw-r--r--src/library/scala/reflect/Type.scala16
-rwxr-xr-xsrc/library/scala/reflect/generic/PickleBuffer.scala11
-rwxr-xr-xsrc/library/scala/reflect/generic/Trees.scala22
-rwxr-xr-xsrc/library/scala/reflect/generic/UnPickler.scala6
-rw-r--r--src/library/scala/runtime/Nothing$.scala8
-rw-r--r--src/library/scala/runtime/Null$.scala12
-rw-r--r--src/library/scala/runtime/RichFloat.scala4
-rw-r--r--src/library/scala/runtime/StringAdd.scala7
-rw-r--r--src/library/scala/text/Document.scala7
-rw-r--r--src/library/scala/util/parsing/input/StreamReader.scala7
-rw-r--r--src/library/scala/xml/Atom.scala5
-rw-r--r--src/library/scala/xml/Comment.scala5
-rw-r--r--src/library/scala/xml/Document.scala8
-rw-r--r--src/library/scala/xml/Elem.scala19
-rw-r--r--src/library/scala/xml/EntityRef.scala11
-rw-r--r--src/library/scala/xml/MetaData.scala34
-rw-r--r--src/library/scala/xml/NamespaceBinding.scala5
-rw-r--r--src/library/scala/xml/Node.scala29
-rw-r--r--src/library/scala/xml/Utility.scala7
-rw-r--r--src/library/scala/xml/XML.scala8
-rw-r--r--src/library/scala/xml/include/XIncludeException.scala39
-rw-r--r--src/library/scala/xml/include/sax/XIncludeFilter.scala96
53 files changed, 383 insertions, 485 deletions
diff --git a/src/library/scala/collection/JavaConverters.scala b/src/library/scala/collection/JavaConverters.scala
index d5baacedf8..94f7e9701b 100755
--- a/src/library/scala/collection/JavaConverters.scala
+++ b/src/library/scala/collection/JavaConverters.scala
@@ -172,7 +172,8 @@ object JavaConverters {
* returned.
*
* @param b The `Buffer` to be converted.
- * @return An object with an `asJava` method that returns a Java <code>List</code> view of the argument.
+ * @return An object with an `asJava` method that returns a Java `List` view
+ * of the argument.
*/
implicit def bufferAsJavaListConverter[A](b : mutable.Buffer[A]): AsJava[ju.List[A]] =
new AsJava(bufferAsJavaList(b))
@@ -234,8 +235,9 @@ object JavaConverters {
* call of `asSet(java.util.Set)` then the original Java `Set` will be
* returned.
*
- * @param s The <code>Set</code> to be converted.
- * @return An object with an `asJava` method that returns a Java <code>Set</code> view of the argument.
+ * @param s The `Set` to be converted.
+ * @return An object with an `asJava` method that returns a Java `Set` view
+ * of the argument.
*/
implicit def mutableSetAsJavaSetConverter[A](s : mutable.Set[A]): AsJava[ju.Set[A]] =
new AsJava(mutableSetAsJavaSet(s))
@@ -252,8 +254,8 @@ object JavaConverters {
* the Scala interface and vice versa.
*
* If the Scala `Set` was previously obtained from an implicit or explicit
- * call of <code>asSet(java.util.Set)</code> then the original Java `Set`
- * will be returned.
+ * call of `asSet(java.util.Set)` then the original Java `Set` will be
+ * returned.
*
* @param s The `Set` to be converted.
* @return An object with an `asJava` method that returns a Java `Set` view
@@ -299,7 +301,7 @@ object JavaConverters {
* explicit call of `asMap(java.util.Dictionary)` then the original
* Java `Dictionary` will be returned.
*
- * @param m The <code>Map</code> to be converted.
+ * @param m The `Map` to be converted.
* @return An object with an `asJavaDictionary` method that returns a
* Java `Dictionary` view of the argument.
*/
@@ -386,17 +388,20 @@ object JavaConverters {
new AsScala(enumerationAsScalaIterator(i))
/**
- * Adds an `asScala` method that implicitly converts a Java <code>Iterable</code> to a Scala <code>Iterable</code>.
- * The returned Scala <code>Iterable</code> is backed by the provided Java
- * <code>Iterable</code> and any side-effects of using it via the Scala interface will
- * be visible via the Java interface and vice versa.
- * <p>
- * If the Java <code>Iterable</code> was previously obtained from an implicit or
- * explicit call of <code>asIterable(scala.collection.Iterable)</code> then the original
- * Scala <code>Iterable</code> will be returned.
+ * Adds an `asScala` method that implicitly converts a Java `Iterable` to
+ * a Scala `Iterable`.
*
- * @param i The <code>Iterable</code> to be converted.
- * @return An object with an `asScala` method that returns a Scala <code>Iterable</code> view of the argument.
+ * The returned Scala `Iterable` is backed by the provided Java `Iterable`
+ * and any side-effects of using it via the Scala interface will be visible
+ * via the Java interface and vice versa.
+ *
+ * If the Java `Iterable` was previously obtained from an implicit or
+ * explicit call of `asIterable(scala.collection.Iterable)` then the original
+ * Scala `Iterable` will be returned.
+ *
+ * @param i The `Iterable` to be converted.
+ * @return An object with an `asScala` method that returns a Scala `Iterable`
+ * view of the argument.
*/
implicit def iterableAsScalaIterableConverter[A](i : jl.Iterable[A]): AsScala[Iterable[A]] =
new AsScala(iterableAsScalaIterable(i))
@@ -405,14 +410,16 @@ object JavaConverters {
def asScalaIterableConverter[A](i : jl.Iterable[A]): AsScala[Iterable[A]] = iterableAsScalaIterableConverter(i)
/**
- * Adds an `asScala` method that implicitly converts a Java <code>Collection</code> to an Scala <code>Iterable</code>.
- * <p>
- * If the Java <code>Collection</code> was previously obtained from an implicit or
- * explicit call of <code>asCollection(scala.collection.SizedIterable)</code> then
- * the original Scala <code>SizedIterable</code> will be returned.
- *
- * @param i The <code>Collection</code> to be converted.
- * @return An object with an `asScala` method that returns a Scala <code>SizedIterable</code> view of the argument.
+ * Adds an `asScala` method that implicitly converts a Java `Collection` to
+ * an Scala `Iterable`.
+ *
+ * If the Java `Collection` was previously obtained from an implicit or
+ * explicit call of `asCollection(scala.collection.SizedIterable)` then
+ * the original Scala `SizedIterable` will be returned.
+ *
+ * @param i The `Collection` to be converted.
+ * @return An object with an `asScala` method that returns a Scala
+ * `SizedIterable` view of the argument.
*/
implicit def collectionAsScalaIterableConverter[A](i : ju.Collection[A]): AsScala[Iterable[A]] =
new AsScala(collectionAsScalaIterable(i))
diff --git a/src/library/scala/collection/MapProxy.scala b/src/library/scala/collection/MapProxy.scala
index 9b755d6516..de1be37f86 100644
--- a/src/library/scala/collection/MapProxy.scala
+++ b/src/library/scala/collection/MapProxy.scala
@@ -6,12 +6,9 @@
** |/ **
\* */
-
-
package scala.collection
-/** This is a simple wrapper class for <a href="Map.html"
- * target="contentFrame"><code>scala.collection.Map</code></a>.
+/** This is a simple wrapper class for [[scala.collection.Map]].
* It is most useful for assembling customized map abstractions
* dynamically using object composition and forwarding.
*
diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala
index 08db419c03..237a53ee58 100644
--- a/src/library/scala/collection/SeqLike.scala
+++ b/src/library/scala/collection/SeqLike.scala
@@ -683,9 +683,8 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] with GenSeqLike[A, Repr]
def equalsWith[B](that: Seq[B])(f: (A,B) => Boolean): Boolean = corresponds(that)(f)
/**
- * returns a projection that can be used to call non-strict <code>filter</code>,
- * <code>map</code>, and <code>flatMap</code> methods that build projections
- * of the collection.
+ * returns a projection that can be used to call non-strict `filter`,
+ * `map`, and `flatMap` methods that build projections of the collection.
*/
@deprecated("use `view` instead", "2.8.0")
override def projection = view
@@ -781,7 +780,7 @@ object SeqLike {
}
/** Finds a particular index at which one sequence occurs in another sequence.
- * Like indexOf, but finds the latest occurrence rather than earliest.
+ * Like `indexOf`, but finds the latest occurrence rather than earliest.
*
* @see SeqLike#indexOf
*/
diff --git a/src/library/scala/collection/SetProxy.scala b/src/library/scala/collection/SetProxy.scala
index 5260a0c9dd..0448d64cb2 100644
--- a/src/library/scala/collection/SetProxy.scala
+++ b/src/library/scala/collection/SetProxy.scala
@@ -6,12 +6,9 @@
** |/ **
\* */
-
-
package scala.collection
-/** This is a simple wrapper class for <a href="Set.html"
- * target="contentFrame"><code>scala.collection.Set</code></a>.
+/** This is a simple wrapper class for [[scala.collection.Set]].
* It is most useful for assembling customized set abstractions
* dynamically using object composition and forwarding.
*
@@ -19,5 +16,4 @@ package scala.collection
* @author Martin Odersky
* @version 2.0, 01/01/2007
*/
-
trait SetProxy[A] extends Set[A] with SetProxyLike[A, Set[A]]
diff --git a/src/library/scala/collection/generic/Sorted.scala b/src/library/scala/collection/generic/Sorted.scala
index 99eb68065c..7a3a220683 100644
--- a/src/library/scala/collection/generic/Sorted.scala
+++ b/src/library/scala/collection/generic/Sorted.scala
@@ -6,7 +6,6 @@
** |/ **
\* */
-
package scala.collection
package generic
@@ -31,17 +30,19 @@ trait Sorted[K, +This <: Sorted[K, This]] {
def lastKey: K
/** Comparison function that orders keys. */
- def compare(k0: K, k1: K): Int = ordering.compare(k0, k1);
+ def compare(k0: K, k1: K): Int = ordering.compare(k0, k1)
/** Creates a ranged projection of this collection. Any mutations in the
- * ranged projection will update this collection and vice versa. Note: keys
- * are not garuanteed to be consistent between this collection and the projection.
- * This is the case for buffers where indexing is relative to the projection.
+ * ranged projection will update this collection and vice versa.
+ *
+ * Note: keys are not garuanteed to be consistent between this collection
+ * and the projection. This is the case for buffers where indexing is
+ * relative to the projection.
*
* @param from The lower-bound (inclusive) of the ranged projection.
- * <code>None</code> if there is no lower bound.
+ * `None` if there is no lower bound.
* @param until The upper-bound (exclusive) of the ranged projection.
- * <code>None</code> if there is no upper bound.
+ * `None` if there is no upper bound.
*/
def rangeImpl(from: Option[K], until: Option[K]): This
diff --git a/src/library/scala/collection/immutable/ListMap.scala b/src/library/scala/collection/immutable/ListMap.scala
index edee4a9922..05a1cd2e8c 100644
--- a/src/library/scala/collection/immutable/ListMap.scala
+++ b/src/library/scala/collection/immutable/ListMap.scala
@@ -63,11 +63,9 @@ class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] with Se
*/
def get(key: A): Option[B] = None
- /** This method allows one to create a new map with an
- * additional mapping from <code>key</code>
- * to <code>value</code>. If the map contains already a
- * mapping for <code>key</code>, it will be overridden by this
- * function.
+ /** This method allows one to create a new map with an additional mapping
+ * from `key` to `value`. If the map contains already a mapping for `key`,
+ * it will be overridden by this function.
*
* @param key the key element of the updated entry.
* @param value the value element of the updated entry.
@@ -103,7 +101,7 @@ class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] with Se
@bridge def ++[B1 >: B](xs: TraversableOnce[(A, B1)]): ListMap[A, B1] =
++(xs: GenTraversableOnce[(A, B1)])
- /** This creates a new mapping without the given <code>key</code>.
+ /** This creates a new mapping without the given `key`.
* If the map does not contain a mapping for the given key, the
* method returns the same map.
*
@@ -157,7 +155,7 @@ class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] with Se
@tailrec private def apply0(cur: ListMap[A, B1], k: A): B1 = if (k == cur.key) cur.value else apply0(cur.next, k)
- /** Checks if this map maps <code>key</code> to a value and return the
+ /** Checks if this map maps `key` to a value and return the
* value if it exists.
*
* @param key the key of the mapping of interest
@@ -181,7 +179,7 @@ class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] with Se
new m.Node[B2](k, v)
}
- /** Creates a new mapping without the given <code>key</code>.
+ /** Creates a new mapping without the given `key`.
* If the map does not contain a mapping for the given key, the
* method returns the same map.
*
diff --git a/src/library/scala/collection/immutable/ListSet.scala b/src/library/scala/collection/immutable/ListSet.scala
index a298c629be..22e614dd75 100644
--- a/src/library/scala/collection/immutable/ListSet.scala
+++ b/src/library/scala/collection/immutable/ListSet.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.collection
package immutable
@@ -78,10 +76,10 @@ class ListSet[A] extends Set[A]
override def size: Int = 0
override def isEmpty: Boolean = true;
- /** Checks if this set contains element <code>elem</code>.
+ /** Checks if this set contains element `elem`.
*
* @param elem the element to check for membership.
- * @return true, iff <code>elem</code> is contained in this set.
+ * @return `'''true'''`, iff `elem` is contained in this set.
*/
def contains(elem: A): Boolean = false
@@ -158,10 +156,10 @@ class ListSet[A] extends Set[A]
*/
override def isEmpty: Boolean = false
- /** Checks if this set contains element <code>elem</code>.
+ /** Checks if this set contains element `elem`.
*
* @param elem the element to check for membership.
- * @return true, iff <code>elem</code> is contained in this set.
+ * @return `'''true'''`, iff `elem` is contained in this set.
*/
override def contains(e: A) = containsInternal(this, e)
@tailrec private def containsInternal(n: ListSet[A], e: A): Boolean =
@@ -171,8 +169,7 @@ class ListSet[A] extends Set[A]
*/
override def +(e: A): ListSet[A] = if (contains(e)) this else new Node(e)
- /** <code>-</code> can be used to remove a single element from
- * a set.
+ /** `-` can be used to remove a single element from a set.
*/
override def -(e: A): ListSet[A] = if (e == elem) self else {
val tail = self - e; new tail.Node(elem)
diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala
index 66d1562884..4cb7fc43d1 100644
--- a/src/library/scala/collection/immutable/Stream.scala
+++ b/src/library/scala/collection/immutable/Stream.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.collection
package immutable
@@ -166,8 +164,8 @@ self =>
* `f` to each element of this stream.
*
* @param f function to apply to each element.
- * @return <code>f(a<sub>0</sub>), ..., f(a<sub>n</sub>)</code> if this
- * sequence is <code>a<sub>0</sub>, ..., a<sub>n</sub></code>.
+ * @return `f(a,,0,,), ..., f(a,,n,,)` if this
+ * sequence is `a,,0,,, ..., a,,n,,`.
*/
override final def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Stream[A], B, That]): That = {
if (isStreamBuilder(bf)) asThat(
@@ -198,8 +196,8 @@ self =>
*
* @param f the function to apply on each element.
* @param bf $bfinfo
- * @return <code>f(a<sub>0</sub>) ::: ... ::: f(a<sub>n</sub>)</code> if
- * this stream is <code>[a<sub>0</sub>, ..., a<sub>n</sub>]</code>.
+ * @return `f(a,,0,,) ::: ... ::: f(a,,n,,)` if
+ * this stream is `[a,,0,,, ..., a,,n,,]`.
*/
override final def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Stream[A], B, That]): That =
// we assume there is no other builder factory on streams and therefore know that That = Stream[B]
@@ -224,10 +222,10 @@ self =>
else super.flatMap(f)(bf)
/** Returns all the elements of this stream that satisfy the
- * predicate <code>p</code>. The order of the elements is preserved.
+ * predicate `p`. The order of the elements is preserved.
*
* @param p the predicate used to filter the stream.
- * @return the elements of this stream satisfying <code>p</code>.
+ * @return the elements of this stream satisfying `p`.
*/
override def filter(p: A => Boolean): Stream[A] = {
// optimization: drop leading prefix of elems for which f returns false
@@ -276,7 +274,7 @@ self =>
/** A lazier Iterator than LinearSeqLike's. */
override def iterator: Iterator[A] = new StreamIterator(self)
- /** Apply the given function <code>f</code> to each element of this linear sequence
+ /** Apply the given function `f` to each element of this linear sequence
* (while respecting the order of the elements).
*
* @param f the treatment to apply to each element.
@@ -319,22 +317,24 @@ self =>
}
/** Returns all the elements of this stream that satisfy the
- * predicate <code>p</code>. The order of the elements is preserved.
+ * predicate `p`. The order of the elements is preserved.
*
* @param p the predicate used to filter the stream.
- * @return the elements of this stream satisfying <code>p</code>.
+ * @return the elements of this stream satisfying `p`.
*/
override def partition(p: A => Boolean): (Stream[A], Stream[A]) = (filter(p(_)), filterNot(p(_)))
/** Returns a stream formed from this stream and the specified stream
- * <code>that</code> by associating each element of the former with
- * the element at the same position in the latter.
- * If one of the two streams is longer than the other, its remaining elements are ignored.
+ * `that` by associating each element of the former with the element at
+ * the same position in the latter.
+ *
+ * If one of the two streams is longer than the other, its remaining
+ * elements are ignored.
*
- * @return <code>Stream({a<sub>0</sub>,b<sub>0</sub>}, ...,
- * {a<sub>min(m,n)</sub>,b<sub>min(m,n)</sub>)}</code> when
- * <code>Stream(a<sub>0</sub>, ..., a<sub>m</sub>)
- * zip Stream(b<sub>0</sub>, ..., b<sub>n</sub>)</code> is invoked.
+ * @return `Stream({a,,0,,,b,,0,,}, ...,
+ * {a,,min(m,n),,,b,,min(m,n),,)}` when
+ * `Stream(a,,0,,, ..., a,,m,,)
+ * zip Stream(b,,0,,, ..., b,,n,,)` is invoked.
*/
override final def zip[A1 >: A, B, That](that: collection.GenIterable[B])(implicit bf: CanBuildFrom[Stream[A], (A1, B), That]): That =
// we assume there is no other builder factory on streams and therefore know that That = Stream[(A1, B)]
@@ -351,11 +351,11 @@ self =>
this.zip[A1, Int, That](Stream.from(0))
/** Write all defined elements of this iterable into given string builder.
- * The written text begins with the string <code>start</code> and is finished by the string
- * <code>end</code>. Inside, the string representations of defined elements (w.r.t.
- * the method <code>toString()</code>) are separated by the string
- * <code>sep</code>. The method will not force evaluation of undefined elements. A
- * tail of such elements will be represented by a "?" instead.
+ * The written text begins with the string `start` and is finished by the string
+ * `end`. Inside, the string representations of defined elements (w.r.t.
+ * the method `toString()`) are separated by the string `sep`. The method will
+ * not force evaluation of undefined elements. A tail of such elements will be
+ * represented by a `"?"` instead.
*/
override def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder = {
def loop(pre: String, these: Stream[A]) {
@@ -381,11 +381,11 @@ self =>
override def splitAt(n: Int): (Stream[A], Stream[A]) = (take(n), drop(n))
- /** Returns the <code>n</code> first elements of this stream, or else the whole
- * stream, if it has less than <code>n</code> elements.
+ /** Returns the `n` first elements of this stream, or else the whole
+ * stream, if it has less than `n` elements.
*
* @param n the number of elements to take.
- * @return the <code>n</code> first elements of this stream.
+ * @return the `n` first elements of this stream.
*/
override def take(n: Int): Stream[A] =
if (n <= 0 || isEmpty) Stream.empty
@@ -409,14 +409,14 @@ self =>
}
/** The stream without its last element.
- * @throws Predef.UnsupportedOperationException if the stream is empty.
+ * @throws `Predef.UnsupportedOperationException` if the stream is empty.
*/
override def init: Stream[A] =
if (isEmpty) super.init
else if (tail.isEmpty) Stream.Empty
else cons(head, tail.init)
- /** Returns the rightmost <code>n</code> elements from this iterable.
+ /** Returns the rightmost `n` elements from this iterable.
* @param n the number of elements to take
*/
override def takeRight(n: Int): Stream[A] = {
@@ -432,7 +432,7 @@ self =>
// there's nothing we can do about dropRight, so we just keep the definition in LinearSeq
/** Returns the longest prefix of this stream whose elements satisfy
- * the predicate <code>p</code>.
+ * the predicate `p`.
*
* @param p the test predicate.
*/
@@ -441,7 +441,7 @@ self =>
else Stream.Empty
/** Returns the longest suffix of this iterable whose first element
- * does not satisfy the predicate <code>p</code>.
+ * does not satisfy the predicate `p`.
*
* @param p the test predicate.
*/
@@ -458,8 +458,8 @@ self =>
if (isEmpty) this
else cons(head, tail.filter(head !=).distinct)
- /** Returns a new sequence of given length containing the elements of this sequence followed by zero
- * or more occurrences of given elements.
+ /** Returns a new sequence of given length containing the elements of this
+ * sequence followed by zero or more occurrences of given elements.
*/
override def padTo[B >: A, That](len: Int, elem: B)(implicit bf: CanBuildFrom[Stream[A], B, That]): That = {
def loop(len: Int, these: Stream[A]): Stream[B] =
@@ -534,8 +534,7 @@ final class StreamIterator[+A](self: Stream[A]) extends Iterator[A] {
}
/**
- * The object <code>Stream</code> provides helper functions
- * to manipulate streams.
+ * The object `Stream` provides helper functions to manipulate streams.
*
* @author Martin Odersky, Matthias Zenger
* @version 1.1 08/08/03
@@ -544,7 +543,7 @@ final class StreamIterator[+A](self: Stream[A]) extends Iterator[A] {
object Stream extends SeqFactory[Stream] {
/** The factory for streams.
- * @note Methods such as map/flatMap will not invoke the Builder factory,
+ * @note Methods such as map/flatMap will not invoke the `Builder` factory,
* but will return a new stream directly, to preserve laziness.
* The new stream is then cast to the factory's result type.
* This means that every CanBuildFrom that takes a
@@ -650,28 +649,27 @@ object Stream extends SeqFactory[Stream] {
iterate(start)(f) take len
/**
- * Create an infinite stream starting at <code>start</code>
- * and incrementing by step <code>step</code>
+ * Create an infinite stream starting at `start` and incrementing by
+ * step `step`.
*
* @param start the start value of the stream
* @param step the increment value of the stream
- * @return the stream starting at value <code>start</code>.
+ * @return the stream starting at value `start`.
*/
def from(start: Int, step: Int): Stream[Int] =
cons(start, from(start+step, step))
/**
- * Create an infinite stream starting at <code>start</code>
- * and incrementing by 1.
+ * Create an infinite stream starting at `start` and incrementing by `1`.
*
* @param start the start value of the stream
- * @return the stream starting at value <code>start</code>.
+ * @return the stream starting at value `start`.
*/
def from(start: Int): Stream[Int] = from(start, 1)
/**
- * Create an infinite stream containing the given element expression (which is computed for each
- * occurrence)
+ * Create an infinite stream containing the given element expression (which
+ * is computed for each occurrence).
*
* @param elem the element composing the resulting stream
* @return the stream containing an infinite number of elem
@@ -720,15 +718,14 @@ object Stream extends SeqFactory[Stream] {
def concat[A](xs: Iterator[Stream[A]]): Stream[A] = xs.toStream.flatten //(conforms[Stream[A], scala.collection.Traversable[A]])
/**
- * Create a stream with element values
- * <code>v<sub>n+1</sub> = step(v<sub>n</sub>)</code>
- * where <code>v<sub>0</sub> = start</code>
- * and elements are in the range between <code>start</code> (inclusive)
- * and <code>end</code> (exclusive)
+ * Create a stream with element values `v,,n+1,, = step(v,,n,,)` where
+ * `v,,0,, = start` and elements are in the range between `start` (inclusive)
+ * and `end` (exclusive).
+ *
* @param start the start value of the stream
* @param end the end value of the stream
* @param step the increment function of the stream, must be monotonically increasing or decreasing
- * @return the stream starting at value <code>start</code>.
+ * @return the stream starting at value `start`.
*/
@deprecated("use `iterate` instead.", "2.8.0")
def range(start: Int, end: Int, step: Int => Int): Stream[Int] =
diff --git a/src/library/scala/collection/mutable/ArrayStack.scala b/src/library/scala/collection/mutable/ArrayStack.scala
index d31627f55a..b8d817f310 100644
--- a/src/library/scala/collection/mutable/ArrayStack.scala
+++ b/src/library/scala/collection/mutable/ArrayStack.scala
@@ -6,15 +6,11 @@
** |/ **
\* */
-
-
package scala.collection
package mutable
import generic._
-
-
/** Factory object for the `ArrayStack` class.
*
* $factoryInfo
@@ -88,8 +84,7 @@ extends Seq[T]
override def companion = ArrayStack
- /** Replace element at index <code>n</code> with the new element
- * <code>newelem</code>.
+ /** Replace element at index `n` with the new element `newelem`.
*
* This is a constant time operation.
*
diff --git a/src/library/scala/collection/mutable/BufferProxy.scala b/src/library/scala/collection/mutable/BufferProxy.scala
index a06b930033..f7831a7d3f 100644
--- a/src/library/scala/collection/mutable/BufferProxy.scala
+++ b/src/library/scala/collection/mutable/BufferProxy.scala
@@ -56,9 +56,8 @@ trait BufferProxy[A] extends Buffer[A] with Proxy {
override def readOnly = self.readOnly
- /** Appends a number of elements provided by a traversable object
- * via its <code>foreach</code> method. The identity of the
- * buffer is returned.
+ /** Appends a number of elements provided by a traversable object via its
+ * `foreach` method. The identity of the buffer is returned.
*
* @param iter the traversable object.
* @return the updated buffer.
diff --git a/src/library/scala/collection/mutable/ListBuffer.scala b/src/library/scala/collection/mutable/ListBuffer.scala
index 69b15d7a6f..aec7b7bce9 100644
--- a/src/library/scala/collection/mutable/ListBuffer.scala
+++ b/src/library/scala/collection/mutable/ListBuffer.scala
@@ -363,7 +363,7 @@ final class ListBuffer[A]
/** Returns a clone of this buffer.
*
- * @return a <code>ListBuffer</code> with the same elements.
+ * @return a `ListBuffer` with the same elements.
*/
override def clone(): ListBuffer[A] = (new ListBuffer[A]) ++= this
diff --git a/src/library/scala/collection/mutable/StackProxy.scala b/src/library/scala/collection/mutable/StackProxy.scala
index 5dd5592096..d5439a1531 100644
--- a/src/library/scala/collection/mutable/StackProxy.scala
+++ b/src/library/scala/collection/mutable/StackProxy.scala
@@ -1,17 +1,14 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
-
-
package scala.collection
package mutable
-
/** A stack implements a data structure which allows to store and retrieve
* objects in a last-in-first-out (LIFO) fashion.
*
@@ -25,9 +22,9 @@ trait StackProxy[A] extends Stack[A] with Proxy {
def self: Stack[A]
- /** Access element number <code>n</code>.
+ /** Access element number `n`.
*
- * @return the element at index <code>n</code>.
+ * @return the element at index `n`.
*/
override def apply(n: Int): A = self.apply(n)
@@ -52,9 +49,9 @@ trait StackProxy[A] extends Stack[A] with Proxy {
override def pushAll(xs: TraversableOnce[A]): this.type = { self pushAll xs; this }
- /** Pushes all elements provided by an <code>Iterable</code> object
- * on top of the stack. The elements are pushed in the order they
- * are given out by the iterator.
+ /** Pushes all elements provided by an `Iterable` object on top of the
+ * stack. The elements are pushed in the order they are given out by
+ * the iterator.
*
* @param iter an iterable object
*/
diff --git a/src/library/scala/collection/mutable/SynchronizedBuffer.scala b/src/library/scala/collection/mutable/SynchronizedBuffer.scala
index 5b76d94517..d55ce8d684 100644
--- a/src/library/scala/collection/mutable/SynchronizedBuffer.scala
+++ b/src/library/scala/collection/mutable/SynchronizedBuffer.scala
@@ -85,7 +85,7 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
}
/** Appends a number of elements provided by a traversable object
- * via its <code>foreach</code> method.
+ * via its `foreach` method.
*
* @param xs the traversable object.
*/
@@ -103,8 +103,7 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
}
/** Prepends a number of elements provided by a traversable object
- * via its <code>foreach</code> method. The identity of the
- * buffer is returned.
+ * via its `foreach` method. The identity of the buffer is returned.
*
* @param xs the traversable object.
*/
@@ -117,8 +116,7 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
override def prepend(elems: A*): Unit = prependAll(elems)
/** Prepends a number of elements provided by a traversable object
- * via its <code>foreach</code> method. The identity of the
- * buffer is returned.
+ * via its `foreach` method. The identity of the buffer is returned.
*
* @param xs the traversable object.
*/
@@ -126,9 +124,9 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
super.prependAll(xs)
}
- /** Inserts new elements at the index <code>n</code>. Opposed to method
- * <code>update</code>, this method will not replace an element with a
- * one. Instead, it will insert the new elements at index <code>n</code>.
+ /** Inserts new elements at the index `n`. Opposed to method `update`,
+ * this method will not replace an element with a one.
+ * Instead, it will insert the new elements at index `n`.
*
* @param n the index where a new element will be inserted.
* @param elems the new elements to insert.
@@ -137,9 +135,9 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
super.insertAll(n, elems)
}
- /** Inserts new elements at the index <code>n</code>. Opposed to method
- * <code>update</code>, this method will not replace an element with a
- * one. Instead, it will insert a new element at index <code>n</code>.
+ /** Inserts new elements at the index `n`. Opposed to method `update`,
+ * this method will not replace an element with a one.
+ * Instead, it will insert a new element at index `n`.
*
* @param n the index where a new element will be inserted.
* @param xs the traversable object providing all elements to insert.
@@ -148,8 +146,7 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
super.insertAll(n, xs)
}
- /** Replace element at index <code>n</code> with the new element
- * <code>newelem</code>.
+ /** Replace element at index `n` with the new element `newelem`.
*
* @param n the index of the element to replace.
* @param newelem the new element.
@@ -178,13 +175,13 @@ trait SynchronizedBuffer[A] extends Buffer[A] {
/** Return a clone of this buffer.
*
- * @return an <code>ArrayBuffer</code> with the same elements.
+ * @return an `ArrayBuffer` with the same elements.
*/
override def clone(): Self = synchronized {
super.clone()
}
- /** The hashCode method always yields an error, since it is not
+ /** The `hashCode` method always yields an error, since it is not
* safe to use buffers as keys in hash tables.
*
* @return never.
diff --git a/src/library/scala/collection/script/Message.scala b/src/library/scala/collection/script/Message.scala
index 877d005036..7466f2ac3e 100644
--- a/src/library/scala/collection/script/Message.scala
+++ b/src/library/scala/collection/script/Message.scala
@@ -6,18 +6,15 @@
** |/ **
\* */
-
-
package scala.collection
package script
import mutable.ArrayBuffer
-/** Class <code>Message</code> represents messages that are issued by observable
- * collection classes whenever a data structure is changed. Class <code>Message</code>
- * has several subclasses for the various kinds of events: <code>Update</code>
- * <code>Remove</code>, <code>Include</code>, <code>Reset</code>, and
- * <code>Script</code>.
+/** Class `Message` represents messages that are issued by observable
+ * collection classes whenever a data structure is changed. Class `Message`
+ * has several subclasses for the various kinds of events: `Update`
+ * `Remove`, `Include`, `Reset`, and `Script`.
*
* @author Matthias Zenger
* @version 1.0, 08/07/2003
@@ -78,7 +75,7 @@ class Script[A] extends ArrayBuffer[Message[A]] with Message[A] {
if (i > 1)
res = res + ", "
res = res + "[" + i + "] " + it.next
- i = i + 1
+ i += 1
}
res + ")"
}
diff --git a/src/library/scala/concurrent/FutureTaskRunner.scala b/src/library/scala/concurrent/FutureTaskRunner.scala
index 206155ce2a..c5fcde2d19 100644
--- a/src/library/scala/concurrent/FutureTaskRunner.scala
+++ b/src/library/scala/concurrent/FutureTaskRunner.scala
@@ -1,6 +1,14 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2009-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
package scala.concurrent
-/** The <code>FutureTaskRunner</code> trait is a base trait of task runners
+/** The `FutureTaskRunner</code> trait is a base trait of task runners
* that provide some sort of future abstraction.
*
* @author Philipp Haller
diff --git a/src/library/scala/concurrent/MailBox.scala b/src/library/scala/concurrent/MailBox.scala
index b00ab79919..6f9e39d8de 100644
--- a/src/library/scala/concurrent/MailBox.scala
+++ b/src/library/scala/concurrent/MailBox.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.concurrent
/** This class ...
@@ -83,7 +81,7 @@ class MailBox extends AnyRef with ListQueueCreator {
/**
* Block until there is a message in the mailbox for which the processor
- * <code>f</code> is defined.
+ * `f` is defined.
*/
def receive[A](f: PartialFunction[Message, A]): A = {
val r = new Receiver(f)
@@ -93,7 +91,7 @@ class MailBox extends AnyRef with ListQueueCreator {
/**
* Block until there is a message in the mailbox for which the processor
- * <code>f</code> is defined or the timeout is over.
+ * `f` is defined or the timeout is over.
*/
def receiveWithin[A](msec: Long)(f: PartialFunction[Message, A]): A = {
val r = new Receiver(f)
diff --git a/src/library/scala/concurrent/SyncChannel.scala b/src/library/scala/concurrent/SyncChannel.scala
index 1c398f94bb..9f8f0d313b 100644
--- a/src/library/scala/concurrent/SyncChannel.scala
+++ b/src/library/scala/concurrent/SyncChannel.scala
@@ -6,14 +6,11 @@
** |/ **
\* */
-
-
package scala.concurrent
-/** A <code>SyncChannel</code> allows one to exchange data
- * synchronously between a reader and a writer thread.
- * The writer thread is blocked until the data to be written
- * has been read by a corresponding reader thread.
+/** A `SyncChannel` allows one to exchange data synchronously between
+ * a reader and a writer thread. The writer thread is blocked until the
+ * data to be written has been read by a corresponding reader thread.
*
* @author Philipp Haller
* @version 2.0, 04/17/2008
diff --git a/src/library/scala/concurrent/TIMEOUT.scala b/src/library/scala/concurrent/TIMEOUT.scala
index 54d7db853c..d0328928fa 100644
--- a/src/library/scala/concurrent/TIMEOUT.scala
+++ b/src/library/scala/concurrent/TIMEOUT.scala
@@ -6,13 +6,11 @@
** |/ **
\* */
-
-
package scala.concurrent
/**
* The message sent to a message box when the period specified in
- * <code>receiveWithin</code> expires.
+ * `receiveWithin` expires.
*
* @author Martin Odersky
* @version 1.0, 10/03/2003
diff --git a/src/library/scala/concurrent/TaskRunner.scala b/src/library/scala/concurrent/TaskRunner.scala
index 7337c7371f..64e62adfd3 100644
--- a/src/library/scala/concurrent/TaskRunner.scala
+++ b/src/library/scala/concurrent/TaskRunner.scala
@@ -6,11 +6,9 @@
** |/ **
\* */
-
-
package scala.concurrent
-/** The <code>TaskRunner</code> trait...
+/** The `TaskRunner` trait...
*
* @author Philipp Haller
*/
diff --git a/src/library/scala/concurrent/TaskRunners.scala b/src/library/scala/concurrent/TaskRunners.scala
index 9eb036c110..588073dc5e 100644
--- a/src/library/scala/concurrent/TaskRunners.scala
+++ b/src/library/scala/concurrent/TaskRunners.scala
@@ -6,13 +6,11 @@
** |/ **
\* */
-
-
package scala.concurrent
import java.util.concurrent.{ThreadPoolExecutor, LinkedBlockingQueue, TimeUnit}
-/** The <code>TaskRunners</code> object...
+/** The `TaskRunners` object...
*
* @author Philipp Haller
*/
diff --git a/src/library/scala/concurrent/ThreadPoolRunner.scala b/src/library/scala/concurrent/ThreadPoolRunner.scala
index 5747344a29..27d8f2cc32 100644
--- a/src/library/scala/concurrent/ThreadPoolRunner.scala
+++ b/src/library/scala/concurrent/ThreadPoolRunner.scala
@@ -6,14 +6,11 @@
** |/ **
\* */
-
-
package scala.concurrent
import java.util.concurrent.{ExecutorService, Callable, TimeUnit}
-/** The <code>ThreadPoolRunner</code> trait uses
- * a <code>java.util.concurrent.ExecutorService</code>
+/** The `ThreadPoolRunner` trait uses a `java.util.concurrent.ExecutorService`
* to run submitted tasks.
*
* @author Philipp Haller
diff --git a/src/library/scala/concurrent/ThreadRunner.scala b/src/library/scala/concurrent/ThreadRunner.scala
index ee6e2b939b..28fcf57df8 100644
--- a/src/library/scala/concurrent/ThreadRunner.scala
+++ b/src/library/scala/concurrent/ThreadRunner.scala
@@ -6,13 +6,11 @@
** |/ **
\* */
-
-
package scala.concurrent
import java.lang.Thread
-/** The <code>ThreadRunner</code> trait...
+/** The `ThreadRunner` trait...
*
* @author Philipp Haller
*/
diff --git a/src/library/scala/concurrent/pilib.scala b/src/library/scala/concurrent/pilib.scala
index c2968b990d..246fe6d786 100644
--- a/src/library/scala/concurrent/pilib.scala
+++ b/src/library/scala/concurrent/pilib.scala
@@ -36,7 +36,7 @@ object pilib {
/**
* Run several processes in parallel using the following syntax:
- * <code>spawn &lt; p<sub>1</sub> | ... | p<sub>n</sub> &gt;</code>
+ * `spawn < p,,1,, | ... | p,,n,, >`.
*/
abstract class Spawn {
def <(p: => Unit): Spawn
diff --git a/src/library/scala/io/Source.scala b/src/library/scala/io/Source.scala
index 103be17228..09887efdae 100644
--- a/src/library/scala/io/Source.scala
+++ b/src/library/scala/io/Source.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.io
import java.io.{ FileInputStream, InputStream, PrintStream, File => JFile }
@@ -22,7 +20,7 @@ import java.net.{ URI, URL }
object Source {
val DefaultBufSize = 2048
- /** Creates a <code>Source</code> from System.in.
+ /** Creates a `Source` from System.in.
*/
def stdin = fromInputStream(System.in)
@@ -59,7 +57,7 @@ object Source {
def fromFile(name: String, enc: String): BufferedSource =
fromFile(name)(Codec(enc))
- /** creates <code>Source</code> from file with given file: URI
+ /** creates `ource` from file with given file `URI`.
*/
def fromFile(uri: URI)(implicit codec: Codec): BufferedSource =
fromFile(new JFile(uri))(codec)
@@ -83,9 +81,9 @@ object Source {
def fromFile(file: JFile, enc: String, bufferSize: Int): BufferedSource =
fromFile(file, bufferSize)(Codec(enc))
- /** Creates Source from <code>file</code>, using given character encoding,
- * setting its description to filename. Input is buffered in a buffer of
- * size <code>bufferSize</code>.
+ /** Creates Source from `file`, using given character encoding, setting
+ * its description to filename. Input is buffered in a buffer of size
+ * `bufferSize`.
*/
def fromFile(file: JFile, bufferSize: Int)(implicit codec: Codec): BufferedSource = {
val inputStream = new FileInputStream(file)
@@ -98,12 +96,12 @@ object Source {
)(codec) withDescription ("file:" + file.getAbsolutePath)
}
- /** Create a <code>Source</code> from array of bytes, decoding
+ /** Create a `Source` from array of bytes, decoding
* the bytes according to codec.
*
* @param bytes ...
* @param enc ...
- * @return the created <code>Source</code> instance.
+ * @return the created `Source` instance.
*/
def fromBytes(bytes: Array[Byte])(implicit codec: Codec): Source =
fromString(new String(bytes, codec.name))
@@ -111,13 +109,13 @@ object Source {
def fromBytes(bytes: Array[Byte], enc: String): Source =
fromBytes(bytes)(Codec(enc))
- /** Create a <code>Source</code> from array of bytes, assuming
+ /** Create a `Source` from array of bytes, assuming
* one byte per character (ISO-8859-1 encoding.)
*/
def fromRawBytes(bytes: Array[Byte]): Source =
fromString(new String(bytes, Codec.ISO8859.name))
- /** creates <code>Source</code> from file with given file: URI
+ /** creates `Source` from file with given file: URI
*/
def fromURI(uri: URI)(implicit codec: Codec): BufferedSource =
fromFile(new JFile(uri))(codec)
@@ -171,9 +169,9 @@ object Source {
createBufferedSource(is, reset = () => fromInputStream(is)(codec), close = () => is.close())(codec)
}
-/** The class <code>Source</code> implements an iterable representation
- * of source data. Calling method <code>reset</code> returns an identical,
- * resetted source, where possible.
+/** The class `Source` implements an iterable representation of source data.
+ * Calling method `reset` returns an identical, resetted source, where
+ * possible.
*
* @author Burak Emir
* @version 1.0
@@ -233,7 +231,7 @@ abstract class Source extends Iterator[Char] {
*/
def getLines(): Iterator[String] = new LineIterator()
- /** Returns <code>true</code> if this source has more characters.
+ /** Returns `'''true'''` if this source has more characters.
*/
def hasNext = iter.hasNext
@@ -284,11 +282,11 @@ abstract class Source extends Iterator[Char] {
def ch = positioner.ch
def pos = positioner.pos
- /** Reports an error message to the output stream <code>out</code>.
+ /** Reports an error message to the output stream `out`.
*
* @param pos the source position (line/column)
* @param msg the error message to report
- * @param out PrintStream to use (optional: defaults to <code>Console.err</code>)
+ * @param out PrintStream to use (optional: defaults to `Console.err`)
*/
def reportError(
pos: Int,
@@ -315,7 +313,7 @@ abstract class Source extends Iterator[Char] {
/**
* @param pos the source position (line/column)
* @param msg the warning message to report
- * @param out PrintStream to use (optional: defaults to <code>Console.out</code>)
+ * @param out PrintStream to use (optional: defaults to `Console.out`)
*/
def reportWarning(
pos: Int,
diff --git a/src/library/scala/math/BigInt.scala b/src/library/scala/math/BigInt.scala
index 687b6c9713..361e02cb16 100644
--- a/src/library/scala/math/BigInt.scala
+++ b/src/library/scala/math/BigInt.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.math
import java.math.BigInteger
@@ -29,11 +27,11 @@ object BigInt {
@deprecated("Use Long.MaxValue", "2.9.0")
val MaxLong = BigInt(Long.MaxValue)
- /** Constructs a <code>BigInt</code> whose value is equal to that of the
+ /** Constructs a `BigInt` whose value is equal to that of the
* specified integer value.
*
* @param i the specified integer value
- * @return the constructed <code>BigInt</code>
+ * @return the constructed `BigInt`
*/
def apply(i: Int): BigInt =
if (minCached <= i && i <= maxCached) {
@@ -43,11 +41,11 @@ object BigInt {
n
} else new BigInt(BigInteger.valueOf(i))
- /** Constructs a <code>BigInt</code> whose value is equal to that of the
+ /** Constructs a `BigInt` whose value is equal to that of the
* specified long value.
*
* @param l the specified long value
- * @return the constructed <code>BigInt</code>
+ * @return the constructed `BigInt`
*/
def apply(l: Long): BigInt =
if (minCached <= l && l <= maxCached) apply(l.toInt)
@@ -85,8 +83,8 @@ object BigInt {
def apply(x: String): BigInt =
new BigInt(new BigInteger(x))
- /** Translates the string representation of a BigInt in the
- * specified <code>radix</code> into a BigInt.
+ /** Translates the string representation of a `BigInt` in the
+ * specified `radix` into a BigInt.
*
* @param x ...
* @param radix ...
@@ -100,7 +98,7 @@ object BigInt {
def probablePrime(bitLength: Int, rnd: scala.util.Random): BigInt =
new BigInt(BigInteger.probablePrime(bitLength, rnd.self))
- /** Implicit conversion from <code>int</code> to <code>BigInt</code>.
+ /** Implicit conversion from `Int` to `BigInt`.
*/
implicit def int2bigInt(i: Int): BigInt = apply(i)
@@ -340,21 +338,21 @@ class BigInt(val bigInteger: BigInteger) extends ScalaNumber with ScalaNumericCo
*/
def longValue = this.bigInteger.longValue
- /** Converts this BigInt to a <tt>float</tt>.
- * if this BigInt has too great a magnitude to represent as a float,
- * it will be converted to <code>Float.NEGATIVE_INFINITY</code> or
- * <code>Float.POSITIVE_INFINITY</code> as appropriate.
+ /** Converts this `BigInt` to a `float`.
+ * If this `BigInt` has too great a magnitude to represent as a float,
+ * it will be converted to `Float.NEGATIVE_INFINITY` or
+ * `Float.POSITIVE_INFINITY` as appropriate.
*/
def floatValue = this.bigInteger.floatValue
- /** Converts this BigInt to a <tt>double</tt>.
- * if this BigInt has too great a magnitude to represent as a double,
- * it will be converted to <code>Double.NEGATIVE_INFINITY</code> or
- * <code>Double.POSITIVE_INFINITY</code> as appropriate.
+ /** Converts this `BigInt` to a `double`.
+ * if this `BigInt` has too great a magnitude to represent as a double,
+ * it will be converted to `Double.NEGATIVE_INFINITY` or
+ * `Double.POSITIVE_INFINITY` as appropriate.
*/
def doubleValue = this.bigInteger.doubleValue
- /** Create a NumericRange[BigInt] in range <code>[start;end)</code>
+ /** Create a `NumericRange[BigInt]` in range `[start;end)`
* with the specified step, where start is the target BigInt.
*
* @param end the end value of the range (exclusive)
diff --git a/src/library/scala/math/PartialOrdering.scala b/src/library/scala/math/PartialOrdering.scala
index cd3b132c8b..97abf8c2ad 100644
--- a/src/library/scala/math/PartialOrdering.scala
+++ b/src/library/scala/math/PartialOrdering.scala
@@ -6,34 +6,24 @@
** |/ **
\* */
-
-
package scala.math
-/** <p>
- * A trait for representing partial orderings. It is important to
- * distinguish between a type that has a partial order and a representation
- * of partial ordering on some type. This trait is for representing the
- * latter.
- * </p>
- * <p>
- * A <a href="http://en.wikipedia.org/wiki/Partial_order">partial ordering</a>
- * is a binary relation on a type <code>T</code> that is also an equivalence
- * relation on values of type <code>T</code>. This relation is exposed as
- * the <code>lteq</code> method of the <code>PartialOrdering</code> trait.
- * This relation must be:
- * </p>
- * <ul>
- * <li>reflexive: <code>lteq(x, x) == true</code>, for any <code>x</code> of
- * type <code>T</code>.</li>
- * <li>anti-symmetric: <code>lteq(x, y) == true</code> and
- * <code>lteq(y, x) == true</code> then <code>equiv(x, y)</code>, for any
- * <code>x</code> and <code>y</code> of type <code>T</code>.</li>
- * <li>transitive: if <code>lteq(x, y) == true</code> and
- * <code>lteq(y, z) == true</code> then <code>lteq(x, z) == true</code>,
- * for any <code>x</code>, <code>y</code>, and <code>z</code> of type
- * <code>T</code>.</li>
- * </ul>
+/** A trait for representing partial orderings. It is important to
+ * distinguish between a type that has a partial order and a representation
+ * of partial ordering on some type. This trait is for representing the
+ * latter.
+ *
+ * A [[http://en.wikipedia.org/wiki/Partial_order partial ordering]] is a
+ * binary relation on a type `T` that is also an equivalence relation on
+ * values of type `T`. This relation is exposed as the `lteq` method of
+ * the `PartialOrdering` trait. This relation must be:
+ *
+ * - reflexive: `lteq(x, x) == '''true'''`, for any `x` of type `T`.
+ * - anti-symmetric: `lteq(x, y) == '''true'''` and `lteq(y, x) == true`
+ * then `equiv(x, y)`, for any `x` and `y` of type `T`.
+ * - transitive: if `lteq(x, y) == '''true'''` and
+ * `lteq(y, z) == '''true'''` then `lteq(x, z) == '''true'''`,
+ * for any `x`, `y`, and `z` of type `T`.
*
* @author Geoffrey Washburn
* @version 1.0, 2008-04-0-3
@@ -43,37 +33,34 @@ package scala.math
trait PartialOrdering[T] extends Equiv[T] {
outer =>
- /** Result of comparing <code>x</code> with operand <code>y</code>.
- * Returns <code>None</code> if operands are not comparable.
- * If operands are comparable, returns <code>Some(r)</code> where
- * <code>r &lt; 0</code> iff <code>x &lt; y</code>
- * <code>r == 0</code> iff <code>x == y</code>
- * <code>r &gt; 0</code> iff <code>x &gt; y</code>
+ /** Result of comparing `x` with operand `y`.
+ * Returns `None` if operands are not comparable.
+ * If operands are comparable, returns `Some(r)` where
+ * - `r < 0` iff `x < y`
+ * - `r == 0` iff `x == y`
+ * - `r > 0` iff `x > y`
*/
def tryCompare(x: T, y: T): Option[Int]
- /** Returns <code>true</code> iff <code>x</code> comes before
- * <code>y</code> in the ordering.
+ /** Returns `'''true'''` iff `x` comes before `y` in the ordering.
*/
def lteq(x: T, y: T): Boolean
- /** Returns <code>true</code> iff <code>y</code> comes before
- * <code>x</code> in the ordering.
+ /** Returns `'''true'''` iff `y` comes before `x` in the ordering.
*/
def gteq(x: T, y: T): Boolean = lteq(y, x)
- /** Returns <code>true</code> iff <code>x</code> comes before
- * <code>y</code> in the ordering and is not the same as <code>y</code>.
+ /** Returns `'''true'''` iff `x` comes before `y` in the ordering
+ * and is not the same as `y`.
*/
def lt(x: T, y: T): Boolean = lteq(x, y) && !equiv(x, y)
- /** Returns <code>true</code> iff <code>y</code> comes before
- * <code>x</code> in the ordering and is not the same as <code>x</code>.
+ /** Returns `'''true'''` iff `y` comes before `x` in the ordering
+ * and is not the same as `x`.
*/
def gt(x: T, y: T): Boolean = gteq(x, y) && !equiv(x, y)
- /** Returns <code>true</code> iff <code>x</code> is equivalent to
- * <code>y</code> in the ordering.
+ /** Returns `'''true'''` iff `x` is equivalent to `y` in the ordering.
*/
def equiv(x: T, y: T): Boolean = lteq(x,y) && lteq(y,x)
diff --git a/src/library/scala/math/PartiallyOrdered.scala b/src/library/scala/math/PartiallyOrdered.scala
index 6c447d81c6..2c636d8898 100644
--- a/src/library/scala/math/PartiallyOrdered.scala
+++ b/src/library/scala/math/PartiallyOrdered.scala
@@ -17,12 +17,12 @@ package scala.math
*/
trait PartiallyOrdered[+A] {
- /** Result of comparing <code>this</code> with operand <code>that</code>.
- * Returns <code>None</code> if operands are not comparable.
- * If operands are comparable, returns <code>Some(x)</code> where
- * <code>x &lt; 0</code> iff <code>this &lt; that</code>
- * <code>x == 0</code> iff <code>this == that</code>
- * <code>x &gt; 0</code> iff <code>this &gt; that</code>
+ /** Result of comparing `'''this'''` with operand `that`.
+ * Returns `None` if operands are not comparable.
+ * If operands are comparable, returns `Some(x)` where
+ * - `x < 0` iff `'''this''' &lt; that`
+ * - `x == 0` iff `'''this''' == that`
+ * - `x > 0` iff `'''this''' &gt; that`
*/
def tryCompareTo [B >: A <% PartiallyOrdered[B]](that: B): Option[Int]
diff --git a/src/library/scala/math/package.scala b/src/library/scala/math/package.scala
index 2aadfb8e1e..255955be67 100644
--- a/src/library/scala/math/package.scala
+++ b/src/library/scala/math/package.scala
@@ -8,9 +8,9 @@
package scala
-/** The package object <code>scala.math</code> contains methods for performing basic numeric
- * operations such as the elementary exponential, logarithm, square root, and
- * trigonometric functions.
+/** The package object `scala.math` contains methods for performing basic
+ * numeric operations such as the elementary exponential, logarithm,
+ * square root, and trigonometric functions.
*/
package object math extends MathCommon {
@@ -27,4 +27,4 @@ package object math extends MathCommon {
def hypot(x: Double, y: Double): Double = java.lang.Math.hypot(x, y)
def expm1(x: Double): Double = java.lang.Math.expm1(x)
def log1p(x: Double): Double = java.lang.Math.log1p(x)
-} \ No newline at end of file
+}
diff --git a/src/library/scala/ref/Reference.scala b/src/library/scala/ref/Reference.scala
index 0906cf743e..32b6caa43a 100644
--- a/src/library/scala/ref/Reference.scala
+++ b/src/library/scala/ref/Reference.scala
@@ -6,17 +6,16 @@
** |/ **
\* */
-
package scala.ref
/**
- * @see <code>java.lang.ref.Reference</code>
+ * @see `java.lang.ref.Reference`
* @author Sean McDirmid
*/
trait Reference[+T <: AnyRef] extends Function0[T] {
/** return the underlying value */
def apply(): T
- /** return <code>Some</code> underlying if it hasn't been collected, otherwise <code>None</code> */
+ /** return `Some` underlying if it hasn't been collected, otherwise `None` */
def get: Option[T]
override def toString = get.map(_.toString).getOrElse("<deleted>")
def clear(): Unit
diff --git a/src/library/scala/reflect/BeanProperty.scala b/src/library/scala/reflect/BeanProperty.scala
index 1c7b84a7c8..b52774cdff 100644
--- a/src/library/scala/reflect/BeanProperty.scala
+++ b/src/library/scala/reflect/BeanProperty.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.reflect
import annotation.target._
@@ -23,9 +21,8 @@ import annotation.target._
* def setStatus(s: String) { this.status = s }
* def getStatus: String = this.status
* }}}
- * For fields of type `Boolean`, if you need a getter
- * named <code>isStatus</code>, use the
- * `scala.reflect.BooleanBeanProperty` annotation instead.
+ * For fields of type `Boolean`, if you need a getter named `isStatus`,
+ * use the `scala.reflect.BooleanBeanProperty` annotation instead.
*/
@field
class BeanProperty extends annotation.StaticAnnotation
diff --git a/src/library/scala/reflect/NameTransformer.scala b/src/library/scala/reflect/NameTransformer.scala
index 7bc5a61f6c..6c12c8db33 100755
--- a/src/library/scala/reflect/NameTransformer.scala
+++ b/src/library/scala/reflect/NameTransformer.scala
@@ -130,10 +130,10 @@ object NameTransformer {
unicode = true
} catch {
case _:NumberFormatException =>
- /* <code>hex</code> did not decode to a hexadecimal number, so
+ /* `hex` did not decode to a hexadecimal number, so
* do nothing. */
}
- }
+ }
}
}
/* If we didn't see an opcode or encoded Unicode glyph, and the
diff --git a/src/library/scala/reflect/Type.scala b/src/library/scala/reflect/Type.scala
index 5aa92b3828..ddf44d1048 100644
--- a/src/library/scala/reflect/Type.scala
+++ b/src/library/scala/reflect/Type.scala
@@ -32,23 +32,25 @@ case class SingleType(pre: Type, sym: Symbol) extends Type
* clazz.this */
case class ThisType(clazz: Symbol) extends Type
-/** This type is required by the compiler and <b>should not be used in client code</b>.
+/** This type is required by the compiler and '''should not be used in client code'''.
* clazz.super[superClazz]
- * <code>tpe[args1, ..., argsn]</code> */
+ * `tpe[args,,1,,, ..., args,,n,,]`
+ */
case class AppliedType(tpe: Type, args: List[Type]) extends Type
-/** This type is required by the compiler and <b>should not be used in client code</b>.
+/** This type is required by the compiler and '''should not be used in client code'''.
* [a &lt;: lo &gt;: hi] */
case class TypeBounds(lo: Type, hi: Type) extends Type
-/** This type is required by the compiler and <b>should not be used in client code</b>.
- * <code>(formals1 ... formalsn) restpe</code> */
+/** This type is required by the compiler and '''should not be used in client code'''.
+ * `(formals,,1,, ... formals,,n,,) restpe`
+ */
case class MethodType(formals: List[Symbol], restpe: Type) extends Type
-/** This type is required by the compiler and <b>should not be used in client code</b>. */
+/** This type is required by the compiler and '''should not be used in client code'''. */
case class NullaryMethodType(resultType: Type) extends Type
-/** This type is required by the compiler and <b>should not be used in client code</b>. */
+/** This type is required by the compiler and '''should not be used in client code'''. */
case class PolyType(typeParams: List[Symbol], typeBounds: List[(Type, Type)], resultType: Type) extends Type
/* Standard pattern match:
diff --git a/src/library/scala/reflect/generic/PickleBuffer.scala b/src/library/scala/reflect/generic/PickleBuffer.scala
index f52a248f3c..a42e673361 100755
--- a/src/library/scala/reflect/generic/PickleBuffer.scala
+++ b/src/library/scala/reflect/generic/PickleBuffer.scala
@@ -61,7 +61,7 @@ package generic
writeByte((x & 0x7f).toInt)
}
- /** Write a natural number <code>x</code> at position <code>pos</code>.
+ /** Write a natural number `x` at position `pos`.
* If number is more than one byte, shift rest of array to make space.
*
* @param pos ...
@@ -150,9 +150,8 @@ package generic
result.toIndexedSeq
}
- /** Perform operation <code>op</code> until the condition
- * <code>readIndex == end</code> is satisfied.
- * Concatenate results into a list.
+ /** Perform operation `op` until the condition `readIndex == end` is
+ * satisfied. Concatenate results into a list.
*
* @param end ...
* @param op ...
@@ -161,8 +160,8 @@ package generic
def until[T](end: Int, op: () => T): List[T] =
if (readIndex == end) List() else op() :: until(end, op);
- /** Perform operation <code>op</code> the number of
- * times specified. Concatenate the results into a list.
+ /** Perform operation `op` the number of times specified.
+ * Concatenate the results into a list.
*/
def times[T](n: Int, op: ()=>T): List[T] =
if (n == 0) List() else op() :: times(n-1, op)
diff --git a/src/library/scala/reflect/generic/Trees.scala b/src/library/scala/reflect/generic/Trees.scala
index 30dc68981f..5940ebf23e 100755
--- a/src/library/scala/reflect/generic/Trees.scala
+++ b/src/library/scala/reflect/generic/Trees.scala
@@ -1,3 +1,11 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
package scala.reflect
package generic
@@ -571,19 +579,19 @@ import Flags._
}
/** A synthetic term holding an arbitrary type. Not to be confused with
- * with TypTree, the trait for trees that are only used for type trees.
- * TypeTree's are inserted in several places, but most notably in
- * <code>RefCheck</code>, where the arbitrary type trees are all replaced by
+ * `TypTree`, the trait for trees that are only used for type trees.
+ * `TypeTree`'s are inserted in several places, but most notably in
+ * `RefCheck`, where the arbitrary type trees are all replaced by
* TypeTree's. */
abstract class AbsTypeTree extends TypTree {
override def symbol = if (tpe == null) null else tpe.typeSymbol
override def isEmpty = (tpe eq null) || tpe == NoType
}
- /** A tree that has an annotation attached to it. Only used for annotated types and
- * annotation ascriptions, annotations on definitions are stored in the Modifiers.
- * Eliminated by typechecker (typedAnnotated), the annotations are then stored in
- * an AnnotatedType.
+ /** A tree that has an annotation attached to it. Only used for annotated
+ * types and annotation ascriptions, annotations on definitions are stored
+ * in the Modifiers. Eliminated by typechecker (`typedAnnotated`), the
+ * annotations are then stored in an `AnnotatedType`.
*/
case class Annotated(annot: Tree, arg: Tree) extends Tree
diff --git a/src/library/scala/reflect/generic/UnPickler.scala b/src/library/scala/reflect/generic/UnPickler.scala
index f921846d86..e390dbb54b 100755
--- a/src/library/scala/reflect/generic/UnPickler.scala
+++ b/src/library/scala/reflect/generic/UnPickler.scala
@@ -147,9 +147,9 @@ abstract class UnPickler {
result
}
- /** If entry at <code>i</code> is undefined, define it by performing
- * operation <code>op</code> with <code>readIndex at start of i'th
- * entry. Restore <code>readIndex</code> afterwards.
+ /** If entry at `i` is undefined, define it by performing operation `op`
+ * with `readIndex` at start of `i`'th entry. Restore `readIndex`
+ * afterwards.
*/
protected def at[T <: AnyRef](i: Int, op: () => T): T = {
var r = entries(i)
diff --git a/src/library/scala/runtime/Nothing$.scala b/src/library/scala/runtime/Nothing$.scala
index c52783b7cd..7d03280644 100644
--- a/src/library/scala/runtime/Nothing$.scala
+++ b/src/library/scala/runtime/Nothing$.scala
@@ -1,20 +1,16 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
-
-
package scala.runtime
-
/**
* Dummy class which exist only to satisfy the JVM. It corresponds
- * to <code>scala.Nothing</code>. If such type appears in method
+ * to `scala.Nothing`. If such type appears in method
* signatures, it is erased to this one.
*/
-
sealed abstract class Nothing$ extends Throwable
diff --git a/src/library/scala/runtime/Null$.scala b/src/library/scala/runtime/Null$.scala
index 3ba1bb3eb9..964bafa056 100644
--- a/src/library/scala/runtime/Null$.scala
+++ b/src/library/scala/runtime/Null$.scala
@@ -1,20 +1,16 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
-
-
package scala.runtime
-
/**
- * Dummy class which exist only to satisfy the JVM. It corresponds
- * to <code>scala.Null</code>. If such type appears in method
- * signatures, it is erased to this one.
+ * Dummy class which exist only to satisfy the JVM. It corresponds to
+ * `scala.Null`. If such type appears in method signatures, it is erased
+ * to this one.
*/
-
sealed abstract class Null$
diff --git a/src/library/scala/runtime/RichFloat.scala b/src/library/scala/runtime/RichFloat.scala
index 3c385e350b..c6478ec0c9 100644
--- a/src/library/scala/runtime/RichFloat.scala
+++ b/src/library/scala/runtime/RichFloat.scala
@@ -19,7 +19,7 @@ final class RichFloat(val self: Float) extends FractionalProxy[Float] {
* angle measured in radians.
*
* @param x an angle, in degrees
- * @return the measurement of the angle <code>x</code> in radians.
+ * @return the measurement of the angle `x` in radians.
*/
def toRadians: Float = math.toRadians(self).toFloat
@@ -27,7 +27,7 @@ final class RichFloat(val self: Float) extends FractionalProxy[Float] {
* angle measured in degrees.
*
* @param x angle, in radians
- * @return the measurement of the angle <code>x</code> in degrees.
+ * @return the measurement of the angle `x` in degrees.
*/
def toDegrees: Float = math.toDegrees(self).toFloat
diff --git a/src/library/scala/runtime/StringAdd.scala b/src/library/scala/runtime/StringAdd.scala
index 824c4f53b5..ae1975cb4c 100644
--- a/src/library/scala/runtime/StringAdd.scala
+++ b/src/library/scala/runtime/StringAdd.scala
@@ -6,17 +6,14 @@
** **
\* */
-
-
package scala.runtime
-
final class StringAdd(self: Any) {
def +(other: String) = String.valueOf(self) + other
- /** Returns string formatted according to given <code>format</code> string.
- * Format strings are as for <code>String.format</code>
+ /** Returns string formatted according to given `format` string.
+ * Format strings are as for `String.format`
* (@see java.lang.String.format).
*/
def formatted(fmtstr: String): String = fmtstr format self
diff --git a/src/library/scala/text/Document.scala b/src/library/scala/text/Document.scala
index 9d2b9a1f15..c0a54799a3 100644
--- a/src/library/scala/text/Document.scala
+++ b/src/library/scala/text/Document.scala
@@ -6,11 +6,8 @@
** |/ **
\* */
-
-
package scala.text
-
import java.io.Writer
case object DocNil extends Document
@@ -34,8 +31,8 @@ abstract class Document {
def :/:(hd: String): Document = hd :: DocBreak :: this
/**
- * Format this document on <code>writer</code> and try to set line
- * breaks so that the result fits in <code>width</code> columns.
+ * Format this document on `writer` and try to set line
+ * breaks so that the result fits in `width` columns.
*
* @param width ...
* @param writer ...
diff --git a/src/library/scala/util/parsing/input/StreamReader.scala b/src/library/scala/util/parsing/input/StreamReader.scala
index 1905b3dcdf..8244177359 100644
--- a/src/library/scala/util/parsing/input/StreamReader.scala
+++ b/src/library/scala/util/parsing/input/StreamReader.scala
@@ -6,15 +6,14 @@
** |/ **
\* */
-
package scala.util.parsing.input
import java.io.BufferedReader
import scala.collection.immutable.PagedSeq
-/** An object to create a StreamReader from a <code>java.io.Reader</code>.
+/** An object to create a `StreamReader` from a `java.io.Reader`.
*
- * @param in the <code>java.io.Reader</code> that provides the underlying
+ * @param in the `java.io.Reader` that provides the underlying
* stream of characters for this Reader.
*
* @author Miles Sabin
@@ -38,7 +37,7 @@ object StreamReader {
* when a StreamReader are used for input.
*
* If you need to match regexes spanning several lines you should consider
- * class <code>PagedSeqReader</code> instead.
+ * class `PagedSeqReader` instead.
*
* @author Miles Sabin
* @author Martin Odersky
diff --git a/src/library/scala/xml/Atom.scala b/src/library/scala/xml/Atom.scala
index 61329af721..8fb81eaa07 100644
--- a/src/library/scala/xml/Atom.scala
+++ b/src/library/scala/xml/Atom.scala
@@ -6,14 +6,13 @@
** |/ **
\* */
-
package scala.xml
-/** The class <code>Atom</code> provides an XML node for text (PCDATA).
+/** The class `Atom` provides an XML node for text (`PCDATA`).
* It is used in both non-bound and bound XML representations.
*
* @author Burak Emir
- * @param text the text contained in this node, may not be <code>null</code>.
+ * @param text the text contained in this node, may not be `'''null'''`.
*/
class Atom[+A](val data: A) extends SpecialNode with Serializable
{
diff --git a/src/library/scala/xml/Comment.scala b/src/library/scala/xml/Comment.scala
index dc649eb308..ecaec4ba6b 100644
--- a/src/library/scala/xml/Comment.scala
+++ b/src/library/scala/xml/Comment.scala
@@ -6,12 +6,9 @@
** |/ **
\* */
-
-
package scala.xml
-
-/** The class <code>Comment</code> implements an XML node for comments.
+/** The class `Comment` implements an XML node for comments.
*
* @author Burak Emir
* @param text the text contained in this node, may not contain "--"
diff --git a/src/library/scala/xml/Document.scala b/src/library/scala/xml/Document.scala
index df8a926028..4d8208d691 100644
--- a/src/library/scala/xml/Document.scala
+++ b/src/library/scala/xml/Document.scala
@@ -6,14 +6,12 @@
** |/ **
\* */
-
-
package scala.xml
/** A document information item (according to InfoSet spec). The comments
* are copied from the Infoset spec, only augmented with some information
* on the Scala types for definitions that might have no value.
- * also plays the role of an <code>XMLEvent</code> for pull parsing
+ * Also plays the role of an `XMLEvent` for pull parsing.
*
* @author Burak Emir
* @version 1.0, 26/04/2005
@@ -62,14 +60,14 @@ class Document extends NodeSeq with pull.XMLEvent with Serializable {
/** An indication of the standalone status of the document, either
* true or false. This property is derived from the optional standalone
* document declaration in the XML declaration at the beginning of the
- * document entity, and has no value (<code>None</code>) if there is no
+ * document entity, and has no value (`None`) if there is no
* standalone document declaration.
*/
var standAlone: Option[Boolean] = _
/** A string representing the XML version of the document. This
* property is derived from the XML declaration optionally present at
- * the beginning of the document entity, and has no value (<code>None</code>)
+ * the beginning of the document entity, and has no value (`None`)
* if there is no XML declaration.
*/
var version: Option[String] = _
diff --git a/src/library/scala/xml/Elem.scala b/src/library/scala/xml/Elem.scala
index 4ea7e90de2..a522cdab20 100644
--- a/src/library/scala/xml/Elem.scala
+++ b/src/library/scala/xml/Elem.scala
@@ -6,16 +6,16 @@
** |/ **
\* */
-
package scala.xml
-/** This singleton object contains the apply and unapplySeq methods for convenient construction and
- * deconstruction. It is possible to deconstruct any Node instance (that is not a SpecialNode or
- * a Group) using the syntax
- * <code> case Elem(prefix, label, attribs, scope, child @ _*) => ... </code>
+/** This singleton object contains the apply and unapplySeq methods for
+ * convenient construction and deconstruction. It is possible to deconstruct
+ * any `Node` instance (that is not a `SpecialNode` or a `Group`) using the
+ * syntax `case Elem(prefix, label, attribs, scope, child @ _*) => ...`
*
- * Copyright 2008 Google Inc. All Rights Reserved.
- * @author Burak Emir <bqe@google.com>
+ * Copyright 2008 Google Inc. All Rights Reserved.
+ *
+ * @author Burak Emir <bqe@google.com>
*/
object Elem {
def apply(prefix: String,label: String, attributes: MetaData, scope: NamespaceBinding, child: Node*) =
@@ -27,7 +27,7 @@ object Elem {
}
}
-/** The case class <code>Elem</code> extends the <code>Node</code> class,
+/** The case class `Elem` extends the `Node` class,
* providing an immutable data object representing an XML element.
*
* @param prefix namespace prefix (may be null, but not the empty string)
@@ -83,8 +83,7 @@ extends Node with Serializable
child: Seq[Node] = this.child.toSeq
): Elem = Elem(prefix, label, attributes, scope, child: _*)
- /** Returns concatenation of <code>text(n)</code> for each child
- * <code>n</code>.
+ /** Returns concatenation of `text(n)` for each child `n`.
*/
override def text = child map (_.text) mkString
}
diff --git a/src/library/scala/xml/EntityRef.scala b/src/library/scala/xml/EntityRef.scala
index d3f0a3f986..60feeb845d 100644
--- a/src/library/scala/xml/EntityRef.scala
+++ b/src/library/scala/xml/EntityRef.scala
@@ -6,14 +6,9 @@
** |/ **
\* */
-
-
package scala.xml
-
-
-/** The class <code>EntityRef</code> implements an XML node for entity
- * references.
+/** The class `EntityRef` implements an XML node for entity references.
*
* @author Burak Emir
* @version 1.0
@@ -33,10 +28,10 @@ case class EntityRef(entityName: String) extends SpecialNode {
case _ => Utility.sbToString(buildString)
}
- /** Appends "&amp; entityName;" to this string buffer.
+ /** Appends `"&amp; entityName;"` to this string buffer.
*
* @param sb the string buffer.
- * @return the modified string buffer <code>sb</code>.
+ * @return the modified string buffer `sb`.
*/
override def buildString(sb: StringBuilder) =
sb.append("&").append(entityName).append(";")
diff --git a/src/library/scala/xml/MetaData.scala b/src/library/scala/xml/MetaData.scala
index e3e025cf59..cbfb076004 100644
--- a/src/library/scala/xml/MetaData.scala
+++ b/src/library/scala/xml/MetaData.scala
@@ -6,7 +6,6 @@
** |/ **
\* */
-
package scala.xml
import Utility.sbToString
@@ -20,10 +19,12 @@ import scala.collection.Iterator
object MetaData {
/**
- * appends all attributes from new_tail to attribs, without attempting to detect
- * or remove duplicates. The method guarantees that all attributes from attribs come before
- * the attributes in new_tail, but does not guarantee to preserve the relative order of attribs.
- * Duplicates can be removed with normalize.
+ * appends all attributes from new_tail to attribs, without attempting to
+ * detect or remove duplicates. The method guarantees that all attributes
+ * from attribs come before the attributes in new_tail, but does not
+ * guarantee to preserve the relative order of attribs.
+ *
+ * Duplicates can be removed with `normalize`.
*/
@tailrec
def concatenate(attribs: MetaData, new_tail: MetaData): MetaData =
@@ -60,16 +61,17 @@ object MetaData {
}
-/** <p>
- * This class represents an attribute and at the same time a linked list of attributes.
- * Every instance of this class is either an instance of UnprefixedAttribute <code>key,value</code>
- * or an instance of PrefixedAttribute <code>namespace_prefix,key,value</code> or Null, the empty
- * attribute list. Namespace URIs are obtained by using the namespace scope of the element owning
- * this attribute (see <code>getNamespace</code>)
- * </p>
+/** This class represents an attribute and at the same time a linked list of
+ * attributes. Every instance of this class is either
+ * - an instance of `UnprefixedAttribute key,value` or
+ * - an instance of `PrefixedAttribute namespace_prefix,key,value` or
+ * - `Null, the empty attribute list.
*
- * Copyright 2008 Google Inc. All Rights Reserved.
- * @author Burak Emir <bqe@google.com>
+ * Namespace URIs are obtained by using the namespace scope of the element
+ * owning this attribute (see `getNamespace`).
+ *
+ * Copyright 2008 Google Inc. All Rights Reserved.
+ * @author Burak Emir <bqe@google.com>
*/
abstract class MetaData extends Iterable[MetaData] with Equality with Serializable {
/** Updates this MetaData with the MetaData given as argument. All attributes that occur in updates
@@ -91,7 +93,7 @@ abstract class MetaData extends Iterable[MetaData] with Equality with Serializab
*/
def apply(key: String): Seq[Node]
- /** convenience method, same as <code>apply(namespace, owner.scope, key)</code>.
+ /** convenience method, same as `apply(namespace, owner.scope, key)`.
*
* @param namespace_uri namespace uri of key
* @param owner the element owning this attribute list
@@ -207,7 +209,7 @@ abstract class MetaData extends Iterable[MetaData] with Equality with Serializab
/**
* @param scope ...
- * @return <code>true</code> iff ...
+ * @return `'''true'''` iff ...
*/
def wellformed(scope: NamespaceBinding): Boolean
diff --git a/src/library/scala/xml/NamespaceBinding.scala b/src/library/scala/xml/NamespaceBinding.scala
index 7ad2b42989..f284a6e407 100644
--- a/src/library/scala/xml/NamespaceBinding.scala
+++ b/src/library/scala/xml/NamespaceBinding.scala
@@ -6,14 +6,11 @@
** |/ **
\* */
-
-
package scala.xml
import Utility.sbToString
-
-/** The class <code>NamespaceBinding</code> represents namespace bindings
+/** The class `NamespaceBinding` represents namespace bindings
* and scopes. The binding for the default namespace is treated as a null
* prefix. the absent namespace is represented with the null uri. Neither
* prefix nor uri may be empty, which is not checked.
diff --git a/src/library/scala/xml/Node.scala b/src/library/scala/xml/Node.scala
index bf4d81eb27..f219b73d81 100644
--- a/src/library/scala/xml/Node.scala
+++ b/src/library/scala/xml/Node.scala
@@ -6,7 +6,6 @@
** |/ **
\* */
-
package scala.xml
/**
@@ -61,8 +60,8 @@ abstract class Node extends NodeSeq {
def namespace = getNamespace(this.prefix)
/**
- * Convenience method, same as <code>scope.getURI(pre)</code> but additionally
- * checks if scope is <code>null</code>.
+ * Convenience method, same as `scope.getURI(pre)` but additionally
+ * checks if scope is `'''null'''`.
*
* @param pre the prefix whose namespace name we would like to obtain
* @return the namespace if <code>scope != null</code> and prefix was
@@ -72,7 +71,7 @@ abstract class Node extends NodeSeq {
/**
* Convenience method, looks up an unprefixed attribute in attributes of this node.
- * Same as <code>attributes.getValue(key)</code>
+ * Same as `attributes.getValue(key)`
*
* @param key of queried attribute.
* @return value of <code>UnprefixedAttribute</code> with given key
@@ -82,20 +81,20 @@ abstract class Node extends NodeSeq {
/**
* Convenience method, looks up a prefixed attribute in attributes of this node.
- * Same as <code>attributes.getValue(uri, this, key)</code>
+ * Same as `attributes.getValue(uri, this, key)`-
*
* @param uri namespace of queried attribute (may not be null).
* @param key of queried attribute.
- * @return value of <code>PrefixedAttribute</code> with given namespace
- * and given key, otherwise <code>null</code>.
+ * @return value of `PrefixedAttribute` with given namespace
+ * and given key, otherwise `'''null'''`.
*/
final def attribute(uri: String, key: String): Option[Seq[Node]] =
attributes.get(uri, this, key)
/**
* Returns attribute meaning all attributes of this node, prefixed and
- * unprefixed, in no particular order. In class <code>Node</code>, this
- * defaults to <code>Null</code> (the empty attribute list).
+ * unprefixed, in no particular order. In class `Node`, this
+ * defaults to `Null` (the empty attribute list).
*
* @return all attributes of this node
*/
@@ -160,28 +159,28 @@ abstract class Node extends NodeSeq {
Utility.toXML(this, stripComments = stripComments).toString
/**
- * Same as <code>toString(false)</code>.
+ * Same as `toString('''false''')`.
*
* @see <code><a href="#toString">toString(Boolean)</a></code>
*/
override def toString(): String = buildString(false)
/**
- * Appends qualified name of this node to <code>StringBuilder</code>.
+ * Appends qualified name of this node to `StringBuilder`.
*
* @param sb ...
* @return ...
*/
def nameToString(sb: StringBuilder): StringBuilder = {
if (null != prefix) {
- sb.append(prefix)
- sb.append(':')
+ sb append prefix
+ sb append ':'
}
- sb.append(label)
+ sb append label
}
/**
- * Returns a type symbol (e.g. DTD, XSD), default <code>null</code>.
+ * Returns a type symbol (e.g. DTD, XSD), default `'''null'''`.
*/
def xmlType(): TypeSymbol = null
diff --git a/src/library/scala/xml/Utility.scala b/src/library/scala/xml/Utility.scala
index 3969bb9338..a96533e793 100644
--- a/src/library/scala/xml/Utility.scala
+++ b/src/library/scala/xml/Utility.scala
@@ -98,7 +98,7 @@ object Utility extends AnyRef with parsing.TokenTests {
import Escapes.{ escMap, unescMap }
/**
- * Appends escaped string to <code>s</code>.
+ * Appends escaped string to `s`.
*
* @param text ...
* @param s ...
@@ -134,8 +134,7 @@ object Utility extends AnyRef with parsing.TokenTests {
*
* @param ref ...
* @param s ...
- * @return <code>null</code> if <code>ref</code> was not a predefined
- * entity.
+ * @return `'''null'''` if `ref` was not a predefined entity.
*/
final def unescape(ref: String, s: StringBuilder): StringBuilder =
(unescMap get ref) map (s append _) orNull
@@ -271,7 +270,7 @@ object Utility extends AnyRef with parsing.TokenTests {
def appendQuoted(s: String): String = sbToString(appendQuoted(s, _))
/**
- * Appends &quot;s&quot; if string <code>s</code> does not contain &quot;,
+ * Appends &quot;s&quot; if string `s` does not contain &quot;,
* &apos;s&apos; otherwise.
*
* @param s ...
diff --git a/src/library/scala/xml/XML.scala b/src/library/scala/xml/XML.scala
index 04dedfdf45..678028dd28 100644
--- a/src/library/scala/xml/XML.scala
+++ b/src/library/scala/xml/XML.scala
@@ -6,8 +6,6 @@
** |/ **
\* */
-
-
package scala.xml
import parsing.NoBindingFactoryAdapter
@@ -30,9 +28,9 @@ object Source
}
import Source._
-/** The object <code>XML</code> provides constants, and functions to load
+/** The object `XML` provides constants, and functions to load
* and save XML elements. Use this when data binding is not desired, i.e.
- * when XML is handled using <code>Symbol</code> nodes.
+ * when XML is handled using `Symbol` nodes.
*
* @author Burak Emir
* @version 1.0, 25/04/2005
@@ -89,7 +87,7 @@ object XML extends XMLLoader[Elem]
*
* @param w the writer
* @param node the xml node we want to write
- * @param enc the string to be used in <code>xmlDecl</code>
+ * @param enc the string to be used in `xmlDecl`
* @param xmlDecl if true, write xml declaration
* @param doctype if not null, write doctype declaration
*/
diff --git a/src/library/scala/xml/include/XIncludeException.scala b/src/library/scala/xml/include/XIncludeException.scala
index a8ef3954c5..033cf4db61 100644
--- a/src/library/scala/xml/include/XIncludeException.scala
+++ b/src/library/scala/xml/include/XIncludeException.scala
@@ -6,39 +6,33 @@
** |/ **
\* */
-
package scala.xml
package include
/**
- * <p>
- * <code>XIncludeException</code> is the generic superclass
- * for all checked exceptions that may be thrown as a result
- * of a violation of XInclude's rules.
- * </p>
- * <p>
- * Constructs an <code>XIncludeException</code> with the specified detail
- * message. The error message string <code>message</code> can later be
- * retrieved by the <code>{@link java.lang.Throwable#getMessage}</code>
- * method of class <code>java.lang.Throwable</code>.
- * </p>
+ * `XIncludeException` is the generic superclass for all checked exceptions
+ * that may be thrown as a result of a violation of XInclude's rules.
+ *
+ * Constructs an `XIncludeException` with the specified detail message.
+ * The error message string `message` can later be retrieved by the
+ * `{@link java.lang.Throwable#getMessage}`
+ * method of class `java.lang.Throwable`.
*
* @param message the detail message.
*/
class XIncludeException(message: String) extends Exception(message) {
/**
- * uses <code>null</code> as its error detail message.
+ * uses `'''null'''` as its error detail message.
*/
def this() = this(null)
private var rootCause: Throwable = null
/**
- * When an <code>IOException</code>, <code>MalformedURLException</code>
- * or other generic exception is thrown while processing an XML document
- * for XIncludes, it is customarily replaced
- * by some form of <code>XIncludeException</code>.
+ * When an `IOException`, `MalformedURLException` or other generic
+ * exception is thrown while processing an XML document for XIncludes,
+ * it is customarily replaced by some form of `XIncludeException`.
* This method allows you to store the original exception.
*
* @param nestedException the underlying exception which
@@ -49,15 +43,14 @@ class XIncludeException(message: String) extends Exception(message) {
}
/**
- * When an <code>IOException</code>, <code>MalformedURLException</code>
- * or other generic exception is thrown while processing an XML document
- * for XIncludes, it is customarily replaced
- * by some form of <code>XIncludeException</code>.
+ * When an `IOException`, `MalformedURLException` or other generic
+ * exception is thrown while processing an XML document for XIncludes,
+ * it is customarily replaced by some form of `XIncludeException`.
* This method allows you to retrieve the original exception.
- * It returns null if no such exception caused this <code>XIncludeException</code>.
+ * It returns null if no such exception caused this `XIncludeException`.
*
* @return Throwable the underlying exception which caused the
- * <code>XIncludeException</code> to be thrown
+ * `XIncludeException` to be thrown
*/
def getRootCause(): Throwable = this.rootCause
diff --git a/src/library/scala/xml/include/sax/XIncludeFilter.scala b/src/library/scala/xml/include/sax/XIncludeFilter.scala
index adcaf1738b..4bd0336a26 100644
--- a/src/library/scala/xml/include/sax/XIncludeFilter.scala
+++ b/src/library/scala/xml/include/sax/XIncludeFilter.scala
@@ -6,7 +6,6 @@
** |/ **
\* */
-
package scala.xml
package include.sax
@@ -19,57 +18,40 @@ import java.io.{ InputStream, BufferedInputStream, InputStreamReader, IOExceptio
import java.util.Stack
import java.net.{ URL, MalformedURLException }
-/**
- * <p>
- * This is a SAX filter which resolves all XInclude include elements
- * before passing them on to the client application. Currently this
- * class has the following known deviation from the XInclude specification:
- * </p>
- * <ol>
- * <li>XPointer is not supported.</li>
- * </ol>
+/** This is a SAX filter which resolves all XInclude include elements before
+ * passing them on to the client application. Currently this class has the
+ * following known deviation from the XInclude specification:
+ *
+ * 1. XPointer is not supported.
*
- * <p>
- * Furthermore, I would definitely use a new instance of this class
- * for each document you want to process. I doubt it can be used
- * successfully on multiple documents. Furthermore, I can virtually
- * guarantee that this class is not thread safe. You have been
- * warned.
- * </p>
+ * Furthermore, I would definitely use a new instance of this class for each
+ * document you want to process. I doubt it can be used successfully on
+ * multiple documents. Furthermore, I can virtually guarantee that this
+ * class is not thread safe. You have been warned.
*
- * <p>
- * Since this class is not designed to be subclassed, and since
- * I have not yet considered how that might affect the methods
- * herein or what other protected methods might be needed to support
- * subclasses, I have declared this class final. I may remove this
- * restriction later, though the use-case for subclassing is weak.
- * This class is designed to have its functionality extended via a
- * a horizontal chain of filters, not a
- * vertical hierarchy of sub and superclasses.
- * </p>
+ * Since this class is not designed to be subclassed, and since I have not
+ * yet considered how that might affect the methods herein or what other
+ * protected methods might be needed to support subclasses, I have declared
+ * this class final. I may remove this restriction later, though the use-case
+ * for subclassing is weak. This class is designed to have its functionality
+ * extended via a horizontal chain of filters, not a vertical hierarchy of
+ * sub and superclasses.
*
- * <p>
- * To use this class:
- * </p>
- * <ol>
- * <li>Construct an <code>XIncludeFilter</code> object with a known base URL</li>
- * <li>Pass the <code>XMLReader</code> object from which the raw document will
- * be read to the <code>setParent()</code> method of this object. </li>
- * <li>Pass your own <code>ContentHandler</code> object to the
- * <code>setContentHandler()</code> method of this object. This is the
- * object which will receive events from the parsed and included
- * document.
- * </li>
- * <li>Optional: if you wish to receive comments, set your own
- * <code>LexicalHandler</code> object as the value of this object's
- * http://xml.org/sax/properties/lexical-handler property.
- * Also make sure your <code>LexicalHandler</code> asks this object
- * for the status of each comment using <code>insideIncludeElement</code>
- * before doing anything with the comment.
- * </li>
- * <li>Pass the URL of the document to read to this object's
- * <code>parse()</code> method</li>
- * </ol>
+ * To use this class:
+ *
+ * - Construct an `XIncludeFilter` object with a known base URL
+ * - Pass the `XMLReader` object from which the raw document will be read to
+ * the `setParent()` method of this object.
+ * - Pass your own `ContentHandler` object to the `setContentHandler()`
+ * method of this object. This is the object which will receive events
+ * from the parsed and included document.
+ * - Optional: if you wish to receive comments, set your own `LexicalHandler`
+ * object as the value of this object's
+ * `http://xml.org/sax/properties/lexical-handler` property.
+ * Also make sure your `LexicalHandler` asks this object for the status of
+ * each comment using `insideIncludeElement` before doing anything with the
+ * comment.
+ * - Pass the URL of the document to read to this object's `parse()` method
*
* e.g.
* {{{
@@ -79,6 +61,7 @@ import java.net.{ URL, MalformedURLException }
* includer parse args(i)
* }}}
* translated from Elliotte Rusty Harold's Java source.
+ *
* @author Burak Emir
*/
class XIncludeFilter extends XMLFilterImpl {
@@ -119,15 +102,12 @@ class XIncludeFilter extends XMLFilterImpl {
// necessary to throw away contents of non-empty XInclude elements
private var level = 0
- /**
- * <p>
- * This utility method returns true if and only if this reader is
- * currently inside a non-empty include element. (This is <strong>
- * not</strong> the same as being inside the node set which replaces
- * the include element.) This is primarily needed for comments
- * inside include elements. It must be checked by the actual
- * LexicalHandler to see whether a comment is passed or not.
- * </p>
+ /** This utility method returns true if and only if this reader is
+ * currently inside a non-empty include element. (This is '''not''' the
+ * same as being inside the node set which replaces the include element.)
+ * This is primarily needed for comments inside include elements.
+ * It must be checked by the actual `LexicalHandler` to see whether
+ * a comment is passed or not.
*
* @return boolean
*/