/** * Returns an enumeration of the components of this vector. The returned Enumeration * object will generate all items in this vector. The first item generated is the item at * index 0, then the item at index 1, and so on. * * @returns an enumeration of the components of this vector. * @see Enumeration, Iterator */ public function elements() { $enum = new Vector(); for ($i = 0; $i < count($this->list); $i++) { $enum->addElement($this->list[$i]); } return $enum; }