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