// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.Vector;

public class Container {
    private Vector v;
    
    public Container() {
        v = new Vector();
    }
    
    public void add(Data e) {
        v.add(e);
    }
    
    public Data get(int ix) {
        return (Data)v.get(ix);
    }
    
    public int size() {
        return v.size();
    }
    
    public Object clone() {
        Container res = new Container();
        for(int i = 0; i < size(); i++) {
            res.add((Data)get(i).clone());
        }
        return res;
    }
}
