import java.util.*;

/**
 * Productions (Grammar rules) as a vector
 * 
 * @author Nobo Komagata
 * @version 5/30/03
 */
public class Productions extends Vector
{
    /**
     * Find the number of productions
     * 
     * @param       None
     * @return      Number of productions 
     */
    public int length() {
        return super.size();
    }
    
    /**
     * Add a Production at the end of the vector
     * 
     * @param       Production
     * @return      void 
     */
    public void add(Production r) {
        super.addElement(r);
    }
    
    /**
     * Find the production at the specified position
     * 
     * @param       Position (0-indexed)
     * @return      Production 
     */
    public Production at(int i) {
        return (Production) super.elementAt(i);
    }
}

