function Iterator(c)
{
  this.collection = c;
	this.index = -1;
}

Iterator.prototype.hasNext = function()
{
  return (this.index + 1) < this.collection.size();
}

Iterator.prototype.next = function()
{
  return this.collection.toArray()[++this.index];
}

Iterator.prototype.remove = function()
{
  this.collection.content.splice(this.index--,1);
}
  