Code example for Vector

Methods: insertElementAt

0
    /** 
     * Set the first attribute of this element 
     */ 
    public void setFirstAttribute(SyntaxTreeNode attribute) {
	if (_attributeElements == null) {
	    _attributeElements = new Vector(2);
	} 
	_attributeElements.insertElementAt(attribute,0);
    } 
 
    /** 
     * Type-check the contents of this element. The element itself does not 
     * need any type checking as it leaves nothign on the JVM's stack. 
     */ 
    public Type typeCheck(SymbolTable stable) throws TypeCheckError {
	// Type-check all attributes 
	if (_attributeElements != null) {
	    final int count = _attributeElements.size();
	    for (int i = 0; i < count; i++) {
		SyntaxTreeNode node = 
		    (SyntaxTreeNode)_attributeElements.elementAt(i);