1 18 19 package org.codehaus.groovy.antlr; 20 21 27 public class LineColumn { 28 private int line; 29 private int column; 30 31 public LineColumn(int line, int column) { 32 this.line = line; 33 this.column = column; 34 } 35 36 public int getLine() { 37 return line; 38 } 39 40 public int getColumn() { 41 return column; 42 } 43 44 public boolean equals(Object that) { 45 if (this == that) return true; 46 if (that == null || getClass() != that.getClass()) return false; 47 48 final LineColumn lineColumn = (LineColumn) that; 49 50 if (column != lineColumn.column) return false; 51 if (line != lineColumn.line) return false; 52 53 return true; 54 } 55 56 public int hashCode() { 57 int result; 58 result = line; 59 result = 29 * result + column; 60 return result; 61 } 62 63 public String toString() { 64 return "[" + line + "," + column + "]"; 65 } 66 } 67 | Popular Tags |