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