Debian Codegraph @

mod/convert-to-xsd/src/main/com/thaiopensource/relaxng/output/xsd/basic/Facet.java

raw
1 package com.thaiopensource.relaxng.output.xsd.basic;
2
3 import com.thaiopensource.relaxng.edit.SourceLocation;
4 import com.thaiopensource.util.Equal;
5
6 public class Facet extends Annotated {
7 private final String name;
8 private final String value;
9 private final String prefix;
10 private final String namespace;
11
12 public Facet(SourceLocation location, Annotation annotation, String name, String value) {
13 this(location, annotation, name, value, null, null);
14 }
15
16 public Facet(SourceLocation location, Annotation annotation, String name, String value, String prefix, String namespace) {
17 super(location, annotation);
18 this.name = name;
19 this.value = value;
20 this.prefix = prefix;
21 this.namespace = namespace;
22 }
23
24 public String getName() {
25 return name;
26 }
27
28 public String getValue() {
29 return value;
30 }
31
32 public String getPrefix() {
33 return prefix;
34 }
35
36 public String getNamespace() {
37 return namespace;
38 }
39
40 public boolean equals(Object obj) {
41 if (!super.equals(obj))
42 return false;
43 Facet other = (Facet)obj;
44 return (this.name.equals(other.name)
45 && this.value.equals(other.value)
46 && Equal.equal(this.prefix, other.prefix)
47 && Equal.equal(this.namespace, other.namespace));
48 }
49
50 public int hashCode() {
51 return super.hashCode() ^ name.hashCode() ^ value.hashCode();
52 }
53 }