class Terms {

    synchronized void prune( long upToIndex )
    {
        min = max( upToIndex, min );

        int lastToPrune = findRangeContaining( min ) - 1; // we can prune the ranges preceding

        if ( lastToPrune < 0 )
        {
            return;
        }

        size = (indexes.length - 1) - lastToPrune;
        indexes = Arrays.copyOfRange( indexes, lastToPrune + 1, indexes.length );
        terms = Arrays.copyOfRange( terms, lastToPrune + 1, terms.length );
    }

      Terms( long prevIndex, long prevTerm );

}