Example #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);
    }
Example #2
0
 @Override
 public int hashCode() {
   int result = day.hashCode();
   result = 31 * result + unit.hashCode();
   return result;
 }