// $Revision: 1.2 $:
var collection = null;

function Collection() {
  this.collection = new Array();
  this.add = add;
  this.iterator = iterator;
  this.size = size;
  this.first = first;
}

function add(object) {
  this.collection.push(object);
}

function iterator() {
  return new Iterator(copyArray(this.collection));
}

function size() {
  return this.collection == null ? 0 : this.collection.length;
}

function first() {
  return this.collection[0];
}

function copyArray(source) {
  var copy = new Array(source.length);
  for(var i=0; i < source.length; i++)
    copy[i] = source[i];
  return copy;
}


