dap4/d4core/src/main/java/dap4/core/util/Odometer.java
public int
    step(int firstpos, int lastpos)
    {
        for(int i = lastpos - 1; i >= firstpos; i--) { // walk backwards
            if(this.index.indices[i] > this.endpoint[i])
                this.index.indices[i] = this.slices.get(i).getFirst(); // reset this position
            else {
                this.index.indices[i] += this.slices.get(i).getStride();  // move to next indices
                return i;
            }
        }
        return -1;
    }
public int
    step(int firstpos, int lastpos)
    {
        for(int i = lastpos - 1; i >= firstpos; i--) { // walk backwards
            if(this.index.indices[i] > this.endpoint[i])
                this.index.indices[i] = this.slices.get(i).getFirst(); // reset this position
            else {
                this.index.indices[i] += this.slices.get(i).getStride();  // move to next indices
                return i;
            }
        }
        return -1;
    }
public int step ( int firstpos , int lastpos ) { for ( int i = lastpos - 1 ; i >= firstpos ; i -- ) { // walk backwards if ( this . index . indices [ i ] > this . endpoint [ i ] ) this . index . indices [ i ] = this . slices . get ( i ) . getFirst ( ) ; // reset this position else { this . index . indices [ i ] += this . slices . get ( i ) . getStride ( ) ; // move to next indices return i ; } } return - 1 ; }
return -1 if we have completed.
return - 1 if we have completed .