diff options
author | buraq <buraq@epfl.ch> | 2003-11-27 16:32:55 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2003-11-27 16:32:55 +0000 |
commit | 82f98b6f03a3ca7b0ec4673050d572f2e132693c (patch) | |
tree | b545c7cdd2eb32300d2c27b16acecf89a50b0649 | |
parent | 8c48250df5e67bc11b051ca72ca42dc0509d98b1 (diff) | |
download | scala-82f98b6f03a3ca7b0ec4673050d572f2e132693c.tar.gz scala-82f98b6f03a3ca7b0ec4673050d572f2e132693c.tar.bz2 scala-82f98b6f03a3ca7b0ec4673050d572f2e132693c.zip |
moved to scala.xml.nobinding
-rw-r--r-- | sources/scala/xml/Element.scala | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/sources/scala/xml/Element.scala b/sources/scala/xml/Element.scala deleted file mode 100644 index 80495d29a4..0000000000 --- a/sources/scala/xml/Element.scala +++ /dev/null @@ -1,53 +0,0 @@ -package scala.xml ; - -import scala.collection.Map; - -/** superclass for specific representation of XML elements. These are created by the dtd2scala tool, together -* with a parsing facility. -*/ -abstract class Element { - - def getName: String; // the real element name - def getChildren: Seq[ Node ]; // the children - def getAttribs: Map[ String, String ]; // disabled updates - def setAttribs( m:Map[ String, String ] ):Unit ; - - /** see Element.hashValue - */ - - override def hashCode() = Element.hashValue( getName, getAttribs, getChildren ); - - def toXML: String = { - "<" + getName + Generic.toXML( getAttribs ) + ">" - + toXML_( getChildren ) - + "</" + getName +">" - } - - def toXML_( elems:Seq[Element] ):String = elems match { - case head :: tail => head.toXML + toXML_( tail ); - case Nil => ""; - } - - override def toString() = getName.concat("(").concat(getChildren.toString().concat(")")); - -} // abstract class Element - -/** static helper methods for specific representations of XML elemens -*/ -object Element { - - /** returns a hash value computed from the element name, attributes and hash values of children. - */ - - def hashValue( name:String, attribs:Map[ String, String ], children:Seq[ Element ] ) = { - name.hashCode() + attribs.toList.hashCode() + children.hashCode() - } - - /** returns a hash value computed from the element name, attributes and hash values of children. - - def hashValue( name:String, attribs:java.util.Map, children:Seq[ Element ] ) = { - name.hashCode() + attribs.hashCode() + children.hashCode() - } - */ - -} |