95 } 96 97 @Override 98 public boolean equals(Object other) { 99 if (this == other) { 100 return true; 101 } 102 if (!(other instanceof Location)) { 103 return false; 104 } 105 Location loc = (Location)other; 106 return Objects.equals(path, loc.path) && 107 line == loc.line && column == loc.column && 108 offset == loc.offset; 109 } 110 111 @Override 112 public int hashCode() { 113 return Objects.hashCode(path) ^ line ^ column ^ offset; 114 } 115 } 116 } | 95 } 96 97 @Override 98 public boolean equals(Object other) { 99 if (this == other) { 100 return true; 101 } 102 if (!(other instanceof Location)) { 103 return false; 104 } 105 Location loc = (Location)other; 106 return Objects.equals(path, loc.path) && 107 line == loc.line && column == loc.column && 108 offset == loc.offset; 109 } 110 111 @Override 112 public int hashCode() { 113 return Objects.hashCode(path) ^ line ^ column ^ offset; 114 } 115 116 @Override 117 public String toString() { 118 return Objects.toString(path) + ":" + line + ":" + column + ":" + offset; 119 } 120 } 121 } |