1 package jester; 2 3 public class IgnorePair { 4 private String start, end; 5 6 public IgnorePair(String start, String end) { 7 this.start = start; 8 this.end = end; 9 } 10 11 public boolean equals(Object other) { 12 return other instanceof IgnorePair && equals((IgnorePair)other); 13 } 14 15 private boolean equals(IgnorePair other) { 16 return start.equals(other.start) && end.equals(other.end); 17 } 18 19 public int hashCode() { 20 return start.hashCode() + end.hashCode(); 21 } 22 23 public String toString() { 24 return "IgnorePair '"+start+"' -> '"+end+"'"; 25 } 26 27 public String getStart() { 28 return start; 29 } 30 31 public String getEnd() { 32 return end; 33 } 34 35 } 36 | Popular Tags |