opendap/src/main/java/opendap/dap/DGrid.java
public BaseType getVar(int index)
            throws NoSuchVariableException
    {
        if (index == 0) {
            return (arrayVar);
        } else {
            int i = index - 1;
            if (i < mapVars.size())
                return ((BaseType) mapVars.elementAt(i));
            else
                throw new NoSuchVariableException("DGrid.getVariable() No Such variable: " + index + " - 1");
        }
    }
public BaseType getVar(int index)
            throws NoSuchVariableException
    {
        if (index == 0) {
            return (arrayVar);
        } else {
            int i = index - 1;
            if (i < mapVars.size())
                return ((BaseType) mapVars.elementAt(i));
            else
                throw new NoSuchVariableException("DGrid.getVariable() No Such variable: " + index + " - 1");
        }
    }
public BaseType getVar ( int index ) throws NoSuchVariableException { if ( index == 0 ) { return ( arrayVar ) ; } else { int i = index - 1 ; if ( i < mapVars . size ( ) ) return ( ( BaseType ) mapVars . elementAt ( i ) ) ; else throw new NoSuchVariableException ( "DGrid.getVariable() No Such variable: " + index + " - 1" ) ; } }
Gets the indexed variable. For a DGrid the index 0 returns the <code>DArray</code> and
indexes 1 and higher return the associated map <code>Vector</code>s.

@param index the index of the variable in the <code>Vector</code> Vars.
@return the indexed variable.
@throws NoSuchVariableException if the named variable does not
exist in this container.
Gets the indexed variable . For a DGrid the index 0 returns the <code > DArray< / code > and indexes 1 and higher return the associated map <code > Vector< / code > s .