/* Copyright 2001 Michael R. Wick */ package Shapes; import java.util.*; public class ShapeVector { protected Vector elements; public ShapeVector() { elements = new Vector(); } public void addElement( Shape s ){ elements.addElement(s); } public Shape elementAt( int i ){ return ((Shape)(elements.elementAt(i)) ); } public int size(){ return (elements.size()); } public ShapeIterator iterator(){ return (new ShapeIterator( this ) ); } }