summaryrefslogtreecommitdiff
path: root/sources/scala/xml/EntityRef.scala
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scala/xml/EntityRef.scala')
-rw-r--r--sources/scala/xml/EntityRef.scala38
1 files changed, 38 insertions, 0 deletions
diff --git a/sources/scala/xml/EntityRef.scala b/sources/scala/xml/EntityRef.scala
new file mode 100644
index 0000000000..192cf85797
--- /dev/null
+++ b/sources/scala/xml/EntityRef.scala
@@ -0,0 +1,38 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2004, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+** $Id$
+\* */
+
+package scala.xml;
+
+/** an XML node for entity references
+ *
+ * @author buraq
+ * @param text the text contained in this node
+ **/
+
+case class EntityRef( entityName:String ) extends SpecialNode {
+
+ final override def typeTag$:Int = -5;
+
+ /** structural equality */
+ override def equals(x: Any): Boolean = x match {
+ case EntityRef(x) => x.equals(entityName);
+ case _ => false
+ }
+
+ /** the constant "#ENTITY"
+ */
+ def label = "#ENTITY";
+
+ override def hashCode() = entityName.hashCode();
+
+ /** appends "& entityName;" to this stringbuffer */
+ def toString(sb:StringBuffer) =
+ sb.append("&").append(entityName).append(";");
+
+}