0
|
1 package nabble.naml.dom;
|
|
2
|
|
3 import java.util.Collection;
|
|
4
|
|
5
|
|
6 public final class EmptyElement extends Element {
|
|
7
|
|
8 public EmptyElement(ElementName name,Collection<Attribute> attributes,String spaceAtEndOfOpeningTag,int lineNumber) {
|
|
9 super(name,attributes,spaceAtEndOfOpeningTag,lineNumber);
|
|
10 }
|
|
11
|
|
12 public String toString() {
|
|
13 StringBuilder buf = new StringBuilder();
|
|
14 addStartTag(buf);
|
|
15 buf.append( "/>" );
|
|
16 return buf.toString();
|
|
17 }
|
|
18
|
|
19 public String openingTag() {
|
|
20 return toString();
|
|
21 }
|
|
22
|
|
23 /*
|
|
24 public boolean equals(Object obj) {
|
|
25 if( !(obj instanceof EmptyElement) )
|
|
26 return false;
|
|
27 EmptyElement element = (EmptyElement)obj;
|
|
28 return element.name.equals(name)
|
|
29 && element.attrMap.equals(attrMap)
|
|
30 ;
|
|
31 }
|
|
32 */
|
|
33 }
|