@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; ComparisonValue other = (ComparisonValue) obj; if (compOp != other.compOp) return false; return true; } }
@Override public TypedValue binaryOpValue(TypedValue.BinaryOperationValue val, I in) throws E { if (remap.containsKey(val)) return remap.get(val); I param = val.visit(parameter, in); TypedValue newLeft = val.left.visit(this, param); TypedValue newRight = val.right.visit(this, param); newLeft = newLeft.visit(rewriter, param); newRight = newRight.visit(rewriter, param); TypedValue newVal = val; if (newLeft != val.left || newRight != val.right) newVal = val.withNewChildren(newLeft, newRight); newVal = newVal.visit(rewriter, in); remap.put(val, newVal); return newVal; } // @Override public TypedValue comparisonOpValue(TypedValue.ComparisonValue val, I in) throws TypedValueVisitorException
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; MathOpValue other = (MathOpValue) obj; if (op != other.op) return false; return true; } }
public BinaryOperationValue withNewChildren(TypedValue newLeft, TypedValue newRight) { return new BinaryOperationValue(type, operation, newLeft, newRight); } @Override
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((compOp == null) ? 0 : compOp.hashCode()); return result; } @Override
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((op == null) ? 0 : op.hashCode()); return result; } @Override