Debian Codegraph @

mod/convert-to-xsd/src/main/com/thaiopensource/relaxng/output/xsd/basic/Annotated.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 Annotated extends Located {
7 private final Annotation annotation;
8
9 public Annotated(SourceLocation location, Annotation annotation) {
10 super(location);
11 this.annotation = annotation;
12 }
13
14 public Annotation getAnnotation() {
15 return annotation;
16 }
17
18 public boolean equals(Object obj) {
19 if (obj == null)
20 return false;
21 if (this.getClass() != obj.getClass())
22 return false;
23 return Equal.equal(annotation, ((Annotated)obj).annotation);
24 }
25
26 public int hashCode() {
27 int hc = getClass().hashCode();
28 if (annotation != null)
29 hc ^= annotation.hashCode();
30 return hc;
31 }
32 }