// Decompiled by DJ v2.6.6.51 Copyright 2000 Atanas Neshkov  Date: 6/15/2001 17:43:22
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   com/macromedia/generator/app/GenVector

package com.macromedia.generator.app;

import com.macromedia.generator.api.GenObject;
import java.util.Enumeration;
import java.util.Vector;

public class GenVector
{

    public GenVector()
    {
        FE = new Vector();
    }

    public GenVector(int i)
    {
        FE = new Vector(i);
    }

    public GenVector(int i, int j)
    {
        FE = new Vector(i, j);
    }

    public GenObject add(GenObject genobject)
    {
        if(genobject != null)
            FE.addElement(genobject);
        return genobject;
    }

    protected void finalize()
        throws Throwable
    {
        release();
    }

    public void release()
    {
        GenObject genobject;
        for(Enumeration enumeration = FE.elements(); enumeration.hasMoreElements(); genobject.release())
            genobject = (GenObject)enumeration.nextElement();

        FE.removeAllElements();
    }

    public void release(GenObject genobject)
    {
        if(genobject != null)
        {
            genobject.release();
            FE.removeElement(genobject);
        }
    }

    Vector FE;
}