}
if (!(otherStack instanceof DoubleStack))
{
return false;
}
DoubleStack stack = (DoubleStack) otherStack;
if (this.size() != stack.size())
{
return false;
}
for (int i = 0; i < this.size(); i++)
{
if (Double.compare(this.peekAt(i), stack.peekAt(i)) != 0)
{
return false;
}
}
return true;