dap4/d4cdm/src/main/java/dap4/cdm/CDMUtil.java
static public boolean
    isWhole(List<Range> rangelist, List<DapDimension> dimset, int start, int stop)
            throws dap4.core.util.DapException
    {
        int rsize = (rangelist == null ? 0 : rangelist.size());
        if(rsize != dimset.size())
            throw new dap4.core.util.DapException("range/dimset rank mismatch");
        if(rsize == 0)
            return true;
        if(start < 0 || stop < start || stop > rsize)
            throw new dap4.core.util.DapException("Invalid start/stop indices");

        for(int i = start; i < stop; i++) {
            Range r = rangelist.get(i);
            DapDimension d = dimset.get(i);
            if(r.stride() != 1 || r.first() != 0 || r.length() != d.getSize())
                return false;
        }
        return true;
    }
static public boolean
    isWhole(List<Range> rangelist, List<DapDimension> dimset, int start, int stop)
            throws dap4.core.util.DapException
    {
        int rsize = (rangelist == null ? 0 : rangelist.size());
        if(rsize != dimset.size())
            throw new dap4.core.util.DapException("range/dimset rank mismatch");
        if(rsize == 0)
            return true;
        if(start < 0 || stop < start || stop > rsize)
            throw new dap4.core.util.DapException("Invalid start/stop indices");

        for(int i = start; i < stop; i++) {
            Range r = rangelist.get(i);
            DapDimension d = dimset.get(i);
            if(r.stride() != 1 || r.first() != 0 || r.length() != d.getSize())
                return false;
        }
        return true;
    }
Test a List<Range> against a List<DapDimension>
to see if the range list represents the whole
set of dimensions within the specified indices.

@param rangelist the set of ucar.ma2.Range
@param dimset    the set of DapDimensions
@param start     start looking here
@param stop      stop looking here
@result true if rangelist is whole; false otherwise.