1 19 20 package org.netbeans.modules.web.jsps.parserapi; 21 22 import java.io.File ; 23 24 29 public final class Mark { 30 int line, col; String fileName; 33 public Mark(String filename, int line, int col) { 34 this.line = line; 35 this.col = col; 36 this.fileName = filename; 37 } 38 39 41 public int getLineNumber() { 42 return line; 43 } 44 45 public int getColumnNumber() { 46 return col; 47 } 48 49 public String toString() { 50 return getFile()+"("+line+","+col+")"; 51 } 52 53 public String getFile() { 54 return this.fileName; 55 } 56 57 public String toShortString() { 58 return "("+line+","+col+")"; 59 } 60 61 public boolean equals(Object other) { 62 if (other instanceof Mark) { 63 Mark m = (Mark) other; 64 return this.line == m.line 65 && this.col == m.col 66 && new File (fileName).equals(new File (m.fileName)); 67 } 68 return false; 69 } 70 } 71 72 | Popular Tags |