function ArrayIterator(collection) {
	ArrayIterator.baseConstructor.call(this, collection);
	this.arrayLength 	= collection.length;
	this.actualPos 		= 0;
}

System.extend(ArrayIterator, Iterator);

ArrayIterator.prototype.getArrayLength = function() {
	return this.arrayLength;
}
ArrayIterator.prototype.getActualPos = function() {
	return this.actualPos;
}
ArrayIterator.prototype.setActualPos = function(pos) {
	this.actualPos = pos;
}
ArrayIterator.prototype.hasNext = function() {
	return this.getActualPos() < this.getArrayLength();
}
ArrayIterator.prototype.next = function() {
	try {
		var arrayItem = this.getCollection()[this.getActualPos()];
		this.setActualPos(this.getActualPos() + 1);
		return arrayItem;
	} catch(e) {
		return null;
	}
}
ArrayIterator.prototype.reset = function() {
	this.setActualPos(0);
}
ArrayIterator.prototype.first = function() {
	this.reset();
	return this.next();
}