dap4/d4cdm/src/main/java/dap4/cdm/dsp/CDMDSP.java
static List<Dimension>
    getCoreDimset(List<Dimension> dimset)
            throws DapException
    {
        if (dimset == null) return null;
        List<Dimension> core = new ArrayList<>();
        int pos = -1;
        int count = 0;
        for (int i = 0; i < dimset.size(); i++) {
            if (dimset.get(i).isVariableLength()) {
                pos = i;
                count++;
            } else
                core.add(dimset.get(i));
        }
        if ((pos != dimset.size() - 1) || count > 1)
            throw new DapException("Unsupported use of (*) Dimension");
        return core;
    }
static List<Dimension>
    getCoreDimset(List<Dimension> dimset)
            throws DapException
    {
        if (dimset == null) return null;
        List<Dimension> core = new ArrayList<>();
        int pos = -1;
        int count = 0;
        for (int i = 0; i < dimset.size(); i++) {
            if (dimset.get(i).isVariableLength()) {
                pos = i;
                count++;
            } else
                core.add(dimset.get(i));
        }
        if ((pos != dimset.size() - 1) || count > 1)
            throw new DapException("Unsupported use of (*) Dimension");
        return core;
    }
static List < Dimension > getCoreDimset ( List < Dimension > dimset ) throws DapException { if ( dimset == null ) return null ; List < Dimension > core = new ArrayList <> ( ) ; int pos = - 1 ; int count = 0 ; for ( int i = 0 ; i < dimset . size ( ) ; i ++ ) { if ( dimset . get ( i ) . isVariableLength ( ) ) { pos = i ; count ++ ; } else core . add ( dimset . get ( i ) ) ; } if ( ( pos != dimset . size ( ) - 1 ) || count > 1 ) throw new DapException ( "Unsupported use of (*) Dimension" ) ; return core ; }
Strip vlen dimensions from a set of dimensions

@param dimset
@return subset of dimset with (trailing) vlen removed
@throws DapException
Strip vlen dimensions from a set of dimensions