1 package org.incava.javadoc; 2 3 import org.incava.text.Location; 4 5 6 9 public class JavadocElement 10 { 11 public String text; 12 13 public Location start; 14 15 public Location end; 16 17 public JavadocElement(String text, Location start, Location end) 18 { 19 this.text = text; 20 this.start = start; 21 this.end = end; 22 23 } 25 26 public boolean equals(Object obj) 27 { 28 return obj instanceof JavadocElement && equals((JavadocElement)obj); 29 } 30 31 public boolean equals(JavadocElement other) 32 { 33 return (other.text.equals(text) && 34 other.start.equals(start) && 35 other.end.equals(end)); 36 } 37 38 public String toString() 39 { 40 return "[" + start + " .. " + end + "]: '" + text + "'"; 41 } 42 } 43 | Popular Tags |