summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/Enumeration.scala192
-rw-r--r--src/library/scala/concurrent/Process.scala5
-rw-r--r--src/library/scala/unsealed.scala5
-rw-r--r--src/library/scala/xml/HasKeyValue.scala28
-rw-r--r--src/library/scala/xml/MalformedAttributeException.scala6
-rw-r--r--src/library/scala/xml/Node.scala45
-rw-r--r--src/library/scala/xml/NodeBuffer.scala24
-rw-r--r--src/library/scala/xml/SpecialNode.scala17
-rw-r--r--src/library/scala/xml/Text.scala3
-rw-r--r--src/library/scala/xml/TypeSymbol.scala8
-rw-r--r--src/library/scala/xml/Unparsed.scala11
-rw-r--r--src/library/scala/xml/UnprefixedAttribute.scala16
12 files changed, 210 insertions, 150 deletions
diff --git a/src/library/scala/Enumeration.scala b/src/library/scala/Enumeration.scala
index d377f72890..81d956c647 100644
--- a/src/library/scala/Enumeration.scala
+++ b/src/library/scala/Enumeration.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -14,35 +14,43 @@ package scala
import scala.collection.mutable.{Map, HashMap}
-/** <p>Defines a finite set of values specific to the enumeration. Typically
- * these values enumerate all possible forms something can take and provide a
- * lightweight alternative to case classes.</p>
- * <p>Each call to a <code>Value</code> method adds a new unique value to the
- * enumeration. To be accessible, these values are usually defined as
- * <code>val</code> members of the evaluation</p>
- * <p>All values in an enumeration share a common, unique type defined as the
- * <code>Value</code> type member of the enumeration (<code>Value</code>
- * selected on the stable identifier path of the enumeration instance).</p>
- * <p><b>Example use</b></p>
- * <pre>
- * <b>object</b> Main <b>extends</b> Application {
- *
- * <b>object</b> WeekDays <b>extends</b> Enumeration {
- * <b>val</b> Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value
- * }
- *
- * <b>def</b> isWorkingDay(d: WeekDays.Value) =
- * ! (d == WeekDays.Sat || d == WeekDays.Sun)
- *
- * WeekDays filter (isWorkingDay) foreach { d =&gt; Console.println(d) }
- * }</pre>
- *
- * @param initial The initial value from which to count the integers that
- * identifies values at run-time.
- * @param names The sequence of names to give to this enumeration's values.
- *
- * @author Matthias Zenger
- * @version 1.0, 10/02/04 */
+/** <p>
+ * Defines a finite set of values specific to the enumeration. Typically
+ * these values enumerate all possible forms something can take and provide a
+ * lightweight alternative to case classes.
+ * </p>
+ * <p>
+ * Each call to a <code>Value</code> method adds a new unique value to the
+ * enumeration. To be accessible, these values are usually defined as
+ * <code>val</code> members of the evaluation.
+ * </p>
+ * <p>
+ * All values in an enumeration share a common, unique type defined as the
+ * <code>Value</code> type member of the enumeration (<code>Value</code>
+ * selected on the stable identifier path of the enumeration instance).
+ * </p>
+ * <p>
+ * <b>Example use</b>
+ * </p><pre>
+ * <b>object</b> Main <b>extends</b> Application {
+ *
+ * <b>object</b> WeekDays <b>extends</b> Enumeration {
+ * <b>val</b> Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value
+ * }
+ *
+ * <b>def</b> isWorkingDay(d: WeekDays.Value) =
+ * ! (d == WeekDays.Sat || d == WeekDays.Sun)
+ *
+ * WeekDays filter (isWorkingDay) foreach { d =&gt; Console.println(d) }
+ * }</pre>
+ *
+ * @param initial The initial value from which to count the integers that
+ * identifies values at run-time.
+ * @param names The sequence of names to give to this enumeration's values.
+ *
+ * @author Matthias Zenger
+ * @version 1.0, 10/02/04
+ */
abstract class Enumeration(initial: Int, names: String*) {
def this() = this(0, null)
@@ -124,21 +132,29 @@ abstract class Enumeration(initial: Int, names: String*) {
new Val(nextId, if (nextName.hasNext) nextName.next else null)
/** Creates a fresh value, part of this enumeration, identified by the integer
- * <code>i</code>.
- * @param i An integer that identifies this value at run-time. It must be
- * unique amongst all values of the enumeration. */
+ * <code>i</code>.
+ *
+ * @param i An integer that identifies this value at run-time. It must be
+ * unique amongst all values of the enumeration.
+ * @return ..
+ */
protected final def Value(i: Int): Value =
new Val(i, if (nextName.hasNext) nextName.next else null)
/** Creates a fresh value, part of this enumeration, called <code>name</code>.
- * @param name A human-readable name for that value. */
+ *
+ * @param name A human-readable name for that value.
+ */
protected final def Value(name: String): Value = new Val(nextId, name)
/** Creates a fresh value, part of this enumeration, called <code>name</code>
- * and identified by the integer <code>i</code>.
- * @param i An integer that identifies this value at run-time. It must be
- * unique amongst all values of the enumeration.
- * @param name A human-readable name for that value. */
+ * and identified by the integer <code>i</code>.
+ *
+ * @param i An integer that identifies this value at run-time. It must be
+ * unique amongst all values of the enumeration.
+ * @param name A human-readable name for that value.
+ * @return ..
+ */
protected final def Value(i: Int, name: String): Value = new Val(i, name)
/** The type of the enumerated values. */
@@ -149,21 +165,24 @@ abstract class Enumeration(initial: Int, names: String*) {
/** this enumeration value as an <code>Int</code> bit mask.
* @throws IllegalArgumentException if <code>id</code> is greater than 31
*/
- def mask32 : Int = {
+ def mask32: Int = {
if (id >= 32) throw new IllegalArgumentException
1 << id
}
/** this enumeration value as an <code>Long</code> bit mask.
* @throws IllegalArgumentException if <code>id</code> is greater than 63
*/
- def mask64 : Long = {
+ def mask64: Long = {
if (id >= 64) throw new IllegalArgumentException
1L << id
}
}
- /** A class implementing the Value type. This class can be overriden to
- * change the enumeration's naming and integer identification behaviour. */
+ /** A class implementing the <a href="Enumeration.Value.html"
+ * target="contentFrame"><code>Value</code></a> type. This class can be
+ * overriden to change the enumeration's naming and integer identification
+ * behaviour.
+ */
protected class Val(i: Int, name: String) extends Value {
def this(i: Int) =
this(i, if (nextName.hasNext) nextName.next else i.toString())
@@ -182,63 +201,71 @@ abstract class Enumeration(initial: Int, names: String*) {
}
/** A set that efficiently stores enumeration values as bits.
+ *
* @author Sean McDirmid
*
* @ex
*
-<code>
-object flags extends Enumeration {
- val Public = Value(5, "public");
- val Private = Value(4, "private");
- val Protected = Value(6, "protected");
- val Final = Value(7, "final");
-}
-
-class Entity {
- var flags0 : Int = ...;
- def flags = flags.Set32(flags0);
-}
-
-val e : Entity = ...;
-
-if (e.flags.contains(flags.Private))
- e.flags0 = (e.flags | flags.Final).underlying;
-</code>
+ * <pre>
+ * <b>object</b> flags <b>extends</b> Enumeration {
+ * <b>val</b> Public = Value(5, "public");
+ * <b>val</b> Private = Value(4, "private");
+ * <b>val</b> Protected = Value(6, "protected");
+ * <b>val</b> Final = Value(7, "final");
+ * }
+ *
+ * <b>class</b> Entity {
+ * <b>var</b> flags0 : Int = ...;
+ * <b>def</b> flags = flags.Set32(flags0);
+ * }
+ *
+ * <b>val</b> e : Entity = ...;
+ *
+ * <b>if</b> (e.flags.contains(flags.Private))
+ * e.flags0 = (e.flags | flags.Final).underlying;
+ * </pre>
*/
abstract class SetXX extends collection.immutable.Set[Value] {
+
/** either Int or Long */
type Underlying <: AnyVal
type TSet <: SetXX
+
/** The integer that bit-encodes a set of enumeration values.
*/
- val underlying : Underlying
+ val underlying: Underlying
+
/** returns the underlying integer representation of this set as a long. */
- protected def underlyingAsLong : Long
+ protected def underlyingAsLong: Long
+
/** Equivalent to <code>++</code> for bit sets. Returns a set
* that has all values in <code>this</code> and <code>set</code>.
*/
- def |(set : TSet) : TSet
+ def |(set: TSet): TSet
+
/** Equivalent to <code>+</code> for bit sets. Returns a set
* that has all values in <code>this</code> with the addition of <code>value</code>.
*/
- def |(value : Value) : TSet
+ def |(value: Value): TSet
+
/** Equivalent to <code>**</code> for bit sets.
* Returns a bit set that has all values that are both in <code>this</code> and <code>set</code>.
*/
- def &(set : TSet) : TSet
+ def &(set: TSet): TSet
+
/** Equivalent to <code>-</code> for bit sets.
* Returns a bit set that has all values in <code>this</code> except for <code>value</code>.
*/
- def &~(value : Value) : TSet
- def -(value : Value) : TSet = this &~ value
- def +(value : Value) : TSet = this | value
- def ++(set : TSet) : TSet = this | set
- def **(set : TSet) : TSet = this & set
+ def &~(value: Value): TSet
+ def -(value: Value): TSet = this &~ value
+ def +(value: Value): TSet = this | value
+ def ++(set: TSet): TSet = this | set
+ def **(set: TSet): TSet = this & set
def size = {
var x = underlyingAsLong
var sz = 0
while (x != 0) {
- if ((x & 1) != 0) sz = sz + 1
+ if ((x & 1) != 0) sz += 1
x = x >> 1
}
sz
@@ -250,7 +277,7 @@ if (e.flags.contains(flags.Private))
def hasNext = underlying != 0
private def shift = {
underlying = underlying >> 1
- bit = bit + 1
+ bit += 1
}
def next = {
if (underlying == 0) throw new NoSuchElementException
@@ -262,7 +289,9 @@ if (e.flags.contains(flags.Private))
}
def empty[B]: scala.collection.immutable.Set[B] = new scala.collection.immutable.HashSet[B];
}
- /** An enumeration bit set that can handle enumeration values with ids up to 31 in an <code>Int</code>.
+
+ /** An enumeration bit set that can handle enumeration values with ids up
+ * to 31 in an <code>Int</code>.
*/
class Set32(val underlying : Int) extends SetXX {
def this() = this(0)
@@ -282,11 +311,15 @@ if (e.flags.contains(flags.Private))
def &~(value : Value) = new Set32(underlying & (~value.mask32))
def &(set : Set32) = new Set32(underlying & set.underlying)
}
+
/** create an empty 32 bit enumeration set */
def Set32 = new Set32
+
/** create a bit enumeration set according ot underlying */
def Set32(underlying : Int) = new Set32(underlying)
- /** An enumeration bit set that can handle enumeration values with ids up to 63 in a <code>Long</code>.
+
+ /** An enumeration bit set that can handle enumeration values with ids up
+ * to 63 in a <code>Long</code>.
*/
class Set64(val underlying : Long) extends SetXX {
def this() = this(0)
@@ -299,18 +332,21 @@ if (e.flags.contains(flags.Private))
def &~(value : Value) = new Set64(underlying & (~value.mask64))
def &(set : Set64) = new Set64(underlying & set.underlying)
}
+
/** create an empty 64 bit enumeration set */
def Set64 = new Set64
+
/** create a bit enumeration set according ot underlying */
- def Set64(underlying : Long) = new Set64(underlying)
+ def Set64(underlying: Long) = new Set64(underlying)
+
/** used to reverse engineer bit locations from pre-defined bit masks */
- def maskToBit(n : Long) = {
+ def maskToBit(n: Long) = {
assert(n != 0)
var bit = 0
var m = n
while ((m & 1) != 1) {
m = m >> 1
- bit = bit + 1
+ bit += 1
}
assert(m == 1)
bit
diff --git a/src/library/scala/concurrent/Process.scala b/src/library/scala/concurrent/Process.scala
index 22397684ce..1804c3a984 100644
--- a/src/library/scala/concurrent/Process.scala
+++ b/src/library/scala/concurrent/Process.scala
@@ -16,7 +16,8 @@ package scala.concurrent
*
* @author Erik Stenman
* @version 1.0, 01/10/2003
- * @deprecated use scala.actors package instead
+ *
+ * @deprecated use <a href="../actors$content.html">scala.actors</a> package instead
*/
@deprecated
object Process {
@@ -87,7 +88,7 @@ class Process(body: => Unit) extends Actor() {
//def self = this
- def exit(reason: AnyRef): Unit = {
+ def exit(reason: AnyRef) {
exitReason = reason
interrupt()
}
diff --git a/src/library/scala/unsealed.scala b/src/library/scala/unsealed.scala
index ff59000579..66c59d287a 100644
--- a/src/library/scala/unsealed.scala
+++ b/src/library/scala/unsealed.scala
@@ -11,6 +11,7 @@
package scala
-/** @deprecated use @unchecked instead
+/** @deprecated use <a href="unchecked.html">
+ * <code>@unchecked</code></a> instead.
*/
-@deprecated class unsealed extends Annotation {}
+@deprecated class unsealed extends Annotation
diff --git a/src/library/scala/xml/HasKeyValue.scala b/src/library/scala/xml/HasKeyValue.scala
index 563fc2b7f8..e92fa0d9ae 100644
--- a/src/library/scala/xml/HasKeyValue.scala
+++ b/src/library/scala/xml/HasKeyValue.scala
@@ -1,15 +1,27 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
package scala.xml
// $Id$
-/** use this class to match on (unprefixed) attribute values
- * <p>
- val hasName = new HasKeyValue("name")
- node match {
- case Node("foo", hasName(x), _*) => x // foo had attribute with key "name" and with value x
- }
+/** <p>
+ * Use this class to match on (unprefixed) attribute values
+ * <p><pre>
+ * <b>val</b> hasName = <b>new</b> HasKeyValue("name")
+ * node <b>match</b> {
+ * <b>case</b> Node("foo", hasName(x), _*) => x // foo had attribute with key "name" and with value x
+ * }</pre>
+ *
+ * @author Burak Emir
*/
class HasKeyValue(key: String) {
- def unapplySeq(x:MetaData): Option[Seq[Node]] = x.get(key)
+ def unapplySeq(x: MetaData): Option[Seq[Node]] = x.get(key)
}
-
diff --git a/src/library/scala/xml/MalformedAttributeException.scala b/src/library/scala/xml/MalformedAttributeException.scala
index 0437006583..9dd4c2cf6e 100644
--- a/src/library/scala/xml/MalformedAttributeException.scala
+++ b/src/library/scala/xml/MalformedAttributeException.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -12,4 +12,4 @@
package scala.xml
-case class MalformedAttributeException(msg: String) extends java.lang.RuntimeException(msg)
+case class MalformedAttributeException(msg: String) extends RuntimeException(msg)
diff --git a/src/library/scala/xml/Node.scala b/src/library/scala/xml/Node.scala
index 1d424395b2..9a32667a79 100644
--- a/src/library/scala/xml/Node.scala
+++ b/src/library/scala/xml/Node.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -11,8 +11,6 @@
package scala.xml
-import compat.StringBuilder
-
/**
* This object provides methods ...
*
@@ -27,7 +25,7 @@ object Node {
/** the empty namespace */
val EmptyNamespace = ""
- def unapplySeq(n:Node) = Some (Tuple3(n.label, n.attributes, n.child))
+ def unapplySeq(n: Node) = Some(Tuple3(n.label, n.attributes, n.child))
}
@@ -51,8 +49,9 @@ abstract class Node extends NodeSeq {
def typeTag$: Int = 0
/**
- * method returning the namespace bindings of this node. by default, this is TopScope,
- * which means there are no namespace bindings except the predefined one for "xml".
+ * method returning the namespace bindings of this node. by default, this
+ * is TopScope, which means there are no namespace bindings except the
+ * predefined one for "xml".
*/
def scope: NamespaceBinding = TopScope
@@ -90,11 +89,13 @@ abstract class Node extends NodeSeq {
* @return value of <code>PrefixedAttribute</code> with given namespace
* and given key, otherwise <code>null</code>.
*/
- final def attribute(uri: String, key: String): Option[Seq[Node]] = attributes.get(uri, this, key)
+ 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 Node, this defaults to Null (the empty attribute list).
+ * 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).
*
* @return all attributes of this node
*/
@@ -137,14 +138,18 @@ abstract class Node extends NodeSeq {
case _ => false
}
- /**
- * Returns a hashcode. A standard implementation of hashcodes is obtained by calling
- * Utility.hashCode(pre, label, attributes.hashCode(), child);
- * Martin to Burak: to do: if you make this method abstract, the compiler will now
- * complain if there's no implementation in a subclass. Is this what we want? Note that
- * this would break doc/DocGenator and doc/ModelToXML, with an error message like:
-doc/ModelToXML.scala:95: error: object creation impossible, since there is a deferred declaration of method hashCode in class Node of type ()Int which is not implemented in a subclass
- new SpecialNode {
+ /** <p>
+ * Returns a hashcode. A standard implementation of hashcodes is obtained
+ * by calling <code>Utility.hashCode(pre, label, attributes.hashCode(), child)</code>.
+ * </p>
+ * <p>
+ * Martin to Burak: to do: if you make this method abstract, the compiler
+ * will now complain if there's no implementation in a subclass. Is this
+ * what we want? Note that this would break <code>doc/DocGenator</code> and
+ * doc/ModelToXML, with an error message like:
+ * </p><pre>
+ * doc/ModelToXML.scala:95: error: object creation impossible, since there is a deferred declaration of method hashCode in class Node of type ()Int which is not implemented in a subclass
+ * new SpecialNode {<pre>
*/
override def hashCode(): Int = super.hashCode
@@ -177,12 +182,12 @@ doc/ModelToXML.scala:95: error: object creation impossible, since there is a def
* @param sb ...
* @return ...
*/
- def nameToString(sb: StringBuilder): StringBuilder = {
+ def nameToString(sb: StringBuilder): StringBuilder = {
if (null != prefix) {
sb.append(prefix)
sb.append(':')
}
- sb.append(label);
+ sb.append(label)
}
/**
diff --git a/src/library/scala/xml/NodeBuffer.scala b/src/library/scala/xml/NodeBuffer.scala
index 0e7e1b665e..3e77ea126b 100644
--- a/src/library/scala/xml/NodeBuffer.scala
+++ b/src/library/scala/xml/NodeBuffer.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -12,13 +12,16 @@
package scala.xml
/**
- * This class acts as a Buffer for nodes. If it is used as a sequence
- * of nodes <code>Seq[Node]</code>, it must be ensured that no updates
- * occur after that point, because <code>scala.xml.Node</code> is assumed
- * to be immutable.
- *
- * Despite this being a sequence, don't use it as key in a hashtable.
- * Calling the hashcode function will result in a runtime error.
+ * <p>
+ * This class acts as a Buffer for nodes. If it is used as a sequence
+ * of nodes <code>Seq[Node]</code>, it must be ensured that no updates
+ * occur after that point, because <code>scala.xml.Node</code> is assumed
+ * to be immutable.
+ * </p>
+ * <p>
+ * Despite this being a sequence, don't use it as key in a hashtable.
+ * Calling the hashcode function will result in a runtime error.
+ * </p>
*
* @author Burak Emir
* @version 1.0
@@ -31,7 +34,6 @@ class NodeBuffer extends scala.collection.mutable.ArrayBuffer[Node] {
* an Iterator or Iterable, its elements will be added. If o is a node, it is
* added as it is. If it is anything else, it gets wrapped in an Atom.
*
- *
* @param o converts to an xml node and adds to this node buffer
* @return this nodebuffer
*/
@@ -41,7 +43,7 @@ class NodeBuffer extends scala.collection.mutable.ArrayBuffer[Node] {
// ignore
case it:Iterator[_] =>
- while(it.hasNext)
+ while (it.hasNext)
this &+ it.next
case n:Node =>
diff --git a/src/library/scala/xml/SpecialNode.scala b/src/library/scala/xml/SpecialNode.scala
index 9fb23a64a3..0658ba3ee0 100644
--- a/src/library/scala/xml/SpecialNode.scala
+++ b/src/library/scala/xml/SpecialNode.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -11,11 +11,14 @@
package scala.xml
-import compat.StringBuilder
-
-/** &lt;code&gt;SpecialNode&lt;/code&gt; is a special XML node which
- * represents either text (PCDATA), a comment, a PI, or an entity ref.
- * SpecialNodes also play the role of XMLEvents for pull-parsing.
+/** <p>
+ * <code>SpecialNode</code> is a special XML node which
+ * represents either text (PCDATA), a comment, a PI, or an entity ref.
+ * </p>
+ * <p>
+ * SpecialNodes also play the role of XMLEvents for pull-parsing.
+ * </p>
+ *
* @author Burak Emir
*/
abstract class SpecialNode extends Node with pull.XMLEvent {
diff --git a/src/library/scala/xml/Text.scala b/src/library/scala/xml/Text.scala
index 7170239611..f78150b205 100644
--- a/src/library/scala/xml/Text.scala
+++ b/src/library/scala/xml/Text.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -11,7 +11,6 @@
package scala.xml
-import compat.StringBuilder
/** The class <code>Text</code> implements an XML node for text (PCDATA).
* It is used in both non-bound and bound XML representations.
diff --git a/src/library/scala/xml/TypeSymbol.scala b/src/library/scala/xml/TypeSymbol.scala
index 4834139f92..3b44676333 100644
--- a/src/library/scala/xml/TypeSymbol.scala
+++ b/src/library/scala/xml/TypeSymbol.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -9,7 +9,7 @@
// $Id$
-package scala.xml;
+package scala.xml
-abstract class TypeSymbol;
+abstract class TypeSymbol
diff --git a/src/library/scala/xml/Unparsed.scala b/src/library/scala/xml/Unparsed.scala
index c8fc2d5743..6bda932b89 100644
--- a/src/library/scala/xml/Unparsed.scala
+++ b/src/library/scala/xml/Unparsed.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -11,10 +11,9 @@
package scala.xml
-import compat.StringBuilder
-
-/** an XML node for unparsed content. It will be output verbatim, all bets
- * are off regarding wellformedness etc.
+/** An XML node for unparsed content. It will be output verbatim, all bets
+ * are off regarding wellformedness etc.
+ *
* @author Burak Emir
* @param _data content in this node, may not be null.
*/
diff --git a/src/library/scala/xml/UnprefixedAttribute.scala b/src/library/scala/xml/UnprefixedAttribute.scala
index 4e4694fadb..e8790620de 100644
--- a/src/library/scala/xml/UnprefixedAttribute.scala
+++ b/src/library/scala/xml/UnprefixedAttribute.scala
@@ -11,14 +11,13 @@
package scala.xml
-import compat.StringBuilder
-
-/** unprefixed attributes have the null namespace, and no prefix field
+/** Unprefixed attributes have the null namespace, and no prefix field
*
+ * @author Burak Emir
*/
class UnprefixedAttribute(val key: String, val value: Seq[Node], next1: MetaData) extends MetaData {
- val next = if(value ne null) next1 else next1.remove(key)
+ val next = if (value ne null) next1 else next1.remove(key)
/** same as this(key, Utility.parseAttributeValue(value), next) */
def this(key: String, value: String, next: MetaData) =
@@ -28,7 +27,7 @@ class UnprefixedAttribute(val key: String, val value: Seq[Node], next1: MetaData
def copy(next: MetaData) =
new UnprefixedAttribute(key, value, next)
- def equals1(m:MetaData) =
+ def equals1(m: MetaData) =
!m.isPrefixed && (m.key == key) && (m.value sameElements value)
/** returns null */
@@ -63,8 +62,11 @@ class UnprefixedAttribute(val key: String, val value: Seq[Node], next1: MetaData
/** returns false */
final def isPrefixed = false
- /** appends string representation of only this attribute to stringbuffer */
- def toString1(sb:StringBuilder): Unit = if(value ne null) {
+ /** appends string representation of only this attribute to stringbuffer.
+ *
+ * @param sb ..
+ */
+ def toString1(sb: StringBuilder): Unit = if (value ne null) {
sb.append(key)
sb.append('=')
val sb2 = new StringBuilder()