308309310311312313314315316317318
DoubleStack stack = (DoubleStack) otherStack; if (stack.size() != 1) { return false; } return Double.compare(this.element1, stack.peek()) == 0; } @Override public int hashCode() {