diff options
author | Burak Emir <emir@epfl.ch> | 2005-10-11 19:42:31 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2005-10-11 19:42:31 +0000 |
commit | 924b0f30395f7861b7de27c2536280bde66de29a (patch) | |
tree | a4f95154104c8f276c3d5f3cc702b772a1a4a703 /sources | |
parent | 4b2d79b21cf4a6dc46fd2c05539fc2cb593788f2 (diff) | |
download | scala-924b0f30395f7861b7de27c2536280bde66de29a.tar.gz scala-924b0f30395f7861b7de27c2536280bde66de29a.tar.bz2 scala-924b0f30395f7861b7de27c2536280bde66de29a.zip |
NodeBuffer + => &+
added methods to Null
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/xml/NodeBuffer.scala | 4 | ||||
-rw-r--r-- | sources/scala/xml/Null.scala | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sources/scala/xml/NodeBuffer.scala b/sources/scala/xml/NodeBuffer.scala index 23495f22b9..008dc85249 100644 --- a/sources/scala/xml/NodeBuffer.scala +++ b/sources/scala/xml/NodeBuffer.scala @@ -32,13 +32,13 @@ class NodeBuffer extends scala.collection.mutable.ArrayBuffer[Node] { * * @param n */ - def +(o: Any): NodeBuffer = { + def &+(o: Any): NodeBuffer = { o match { case n:Node => super.+(n); case ns:Iterable[AnyRef] => val it = ns.elements; while(it.hasNext) { - this.+(it.next) + this &+ it.next; } case _ => super.+(Text(o.toString())); } diff --git a/sources/scala/xml/Null.scala b/sources/scala/xml/Null.scala index fb2019c1e3..5790a2fdfd 100644 --- a/sources/scala/xml/Null.scala +++ b/sources/scala/xml/Null.scala @@ -20,6 +20,9 @@ case object Null extends MetaData { /** returns its argument */ def copy(next: MetaData) = next; + + override def elements = Iterator.empty[MetaData]; + override def filter(f: MetaData => Boolean): MetaData = this; /** returns null */ |