}
if (!(otherList instanceof IntList))
{
return false;
}
IntList list = (IntList) otherList;
if (this.size() != list.size())
{
return false;
}
if (this.from <= this.to)
{
int listIndex = 0;
for (int i = this.from; i <= this.to; i += this.step)
{
if (i != list.get(listIndex++))
{
return false;
}
}
}
else
{
int listIndex = 0;
for (int i = this.from; i >= this.to; i += this.step)
{
if (i != list.get(listIndex++))
{
return false;
}
}
}