예제 #1
0
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   } else if (obj instanceof BinaryOperator) {
     BinaryOperator op = (BinaryOperator) obj;
     if (getType() == op.getType()) {
       return equals(leftOperand.equals(op.leftOperand) && rightOperand.equals(op.rightOperand));
     }
   }
   return false;
 }
예제 #2
0
 public int hashCode() {
   return getName().hashCode()
       ^ leftOperand.getName().hashCode()
       ^ rightOperand.getName().hashCode();
 }