예제 #1
0
 @Override
 public boolean equals(Object other) {
   return other instanceof Evaluation
       && (expression != null && expression.equals(((Evaluation) other).expression))
       && (result != null && result.equals(((Evaluation) other).result));
 }
예제 #2
0
 @Override
 public int hashCode() {
   return (expression != null ? expression.hashCode() : 0)
       + (result != null ? result.hashCode() : 0);
 }