01: package org.incava.javadoc;
02:
03: import org.incava.text.Location;
04:
05: /**
06: * A field within a Javadoc comment.
07: */
08: public class JavadocElement {
09: public String text;
10:
11: public Location start;
12:
13: public Location end;
14:
15: public JavadocElement(String text, Location start, Location end) {
16: this .text = text;
17: this .start = start;
18: this .end = end;
19:
20: // tr.Ace.log("created: " + this);
21: }
22:
23: public boolean equals(Object obj) {
24: return obj instanceof JavadocElement
25: && equals((JavadocElement) obj);
26: }
27:
28: public boolean equals(JavadocElement other) {
29: return (other.text.equals(text) && other.start.equals(start) && other.end
30: .equals(end));
31: }
32:
33: public String toString() {
34: return "[" + start + " .. " + end + "]: '" + text + "'";
35: }
36: }
|