예제 #1
0
    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;

      Pair pair = (Pair) o;

      return day.equals(pair.day) && unit.equals(pair.unit);
    }
예제 #2
0
 @Override
 public int hashCode() {
   int result = day.hashCode();
   result = 31 * result + unit.hashCode();
   return result;
 }