Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 @Override
 public int hashCode() {
   return (expression != null ? expression.hashCode() : 0)
       + (result != null ? result.hashCode() : 0);
 }