01: package org.kohsuke.rngom.nc;
02:
03: import javax.xml.namespace.QName;
04:
05: final class NullNameClass extends NameClass {
06: protected NullNameClass() {
07: }
08:
09: public boolean contains(QName name) {
10: return false;
11: }
12:
13: public int containsSpecificity(QName name) {
14: return SPECIFICITY_NONE;
15: }
16:
17: public int hashCode() {
18: return NullNameClass.class.hashCode();
19: }
20:
21: public boolean equals(Object obj) {
22: return this == obj;
23: }
24:
25: public <V> V accept(NameClassVisitor<V> visitor) {
26: return visitor.visitNull();
27: }
28:
29: public boolean isOpen() {
30: return false;
31: }
32:
33: private Object readResolve() {
34: return NameClass.NULL;
35: }
36: }
|