/** * Is this expression the same as another expression? * * @param other the expression to be compared with this one * @return true if the two expressions are statically equivalent */ @Override public boolean equals(Object other) { if (!(other instanceof TupleExpression)) { return false; } else { TupleExpression t2 = (TupleExpression)other; if (getOperanda().getNumberOfOperands() != t2.getOperanda().getNumberOfOperands()) { return false; } for (int i=0; i<getSize(); i++) { if (!getSlot(i).isEqual(t2.getSlot(i))) { return false; } } return true; } }
/** * Is this expression the same as another expression? * * @param other the expression to be compared with this one * @return true if the two expressions are statically equivalent */ @Override public boolean equals(Object other) { if (!(other instanceof TupleExpression)) { return false; } else { TupleExpression t2 = (TupleExpression)other; if (getOperanda().getNumberOfOperands() != t2.getOperanda().getNumberOfOperands()) { return false; } for (int i=0; i<getSize(); i++) { if (!getSlot(i).isEqual(t2.getSlot(i))) { return false; } } return true; } }