Advances the pagination based on the previous pagination settings. This is purely a
convenience method as the method by itself is not aware of the query being executed,
the result count, etc.
@since 1.0.0
492581
public void advancePagination() {
        if (pagination.isPaginated()) {
            pagination = new Pagination(pagination.getStrategy(), pagination.getOffset() + pagination.getLimit(), pagination.getLimit());
        }
    }
464575
void advance()
        {
            // we are always at the leaf level when this method is invoked
            // so we calculate the seed for generating the row by combining the seed that generated the clustering components
            int depth = clusteringComponents.length - 1;
            long parentSeed = clusteringSeeds[depth];
            long rowSeed = seed(clusteringComponents[depth].peek(), generator.clusteringComponents.get(depth).type, parentSeed);

            // and then fill the row with the _non-clustering_ values for the position we _were_ at, as this is what we'll deliver
            for (int i = clusteringSeeds.length ; i < row.row.length ; i++)
            {
                Generator gen = generator.valueComponents.get(i - clusteringSeeds.length);
                gen.setSeed(rowSeed);
                row.row[i] = gen.generate();
            }

            // then we advance the leaf level
            setHasNext(advance(depth, false));
        }
246516
private void advance() {
        next = null;

        // While the underlying iterator has paths, check whether any are
        // accepted by the filter.
        while (iterator.hasNext() && next == null) {
            DependencyPath p = iterator.next();
            if (acceptor.accepts(p)) 
                next = p;
        }        
    }
384634
public function postSearch(): void {
    if ($this->progress) {
      $iterator = $this->getIterator();

      if ($iterator instanceof \SplFileObject) {
        // Get current byte offset, after the line was read.
        $this->progress->setProgress($iterator->ftell());
      }
      elseif (is_int($key = $iterator->key())) {
        // Add one to the current index, because we're in the post-search phase.
        $this->progress->setProgress($key + 1);
      }
      else {
        // If iterator's key is not integer, just advance the progress with 1.
        $this->progress->advance();
      }
    }
  }
1325550
@Override
    public boolean advanceNextPosition()
    {
        boolean needNextRows = !started || !nextRows.hasNext();

        if (!started) {
            started = true;
            nanoStart = System.nanoTime();
        }

        if (needNextRows) {
            currentRow = null;
            try {
                do {
                    if (!scanner.hasMoreRows()) {
                        return false;
                    }

                    nextRows = scanner.nextRows();
                }
                while (!nextRows.hasNext());
                log.debug("Fetched " + nextRows.getNumRows() + " rows");
            }
            catch (KuduException e) {
                throw new RuntimeException(e);
            }
        }

        currentRow = nextRows.next();
        totalBytes += getRowLength();
        return true;
    }
298034
public function paginate()
    {
        $this->count = $this->query->get()->count();
        $this->limit = $this->limit ?: $this->count;
        $this->query->skip($this->offset)->take($this->limit);
    }
978515
@Override
  public void next() {
    if (!hasNext()) {
      throw new IllegalDataException("No more data");
    }
    for (final ITimeSyncedIterator sub : queries.values()) {
      sub.next(timestamp);
    }
    timestamp = nextTimestamp();
  }
404512
def _next(self, **kwargs):
        
        spec = self._pagination_default_spec(kwargs)
        spec.update(kwargs)

        query = queries.build_query(spec)
        query = queries.where_after_entry(query, self._record)

        for record in query.order_by(model.Entry.local_date,
                                     model.Entry.id)[:1]:
            return Entry(record)
        return None
454528
function() {
			this.writeDebug('sorting',arguments);
			var _this = this,
				$mapDiv = $('#' + _this.settings.mapID),
				$sortSelect = $('#' + _this.settings.sortID);

			if ($sortSelect.length === 0) {
				return;
			}

			$sortSelect.on('change.'+pluginName, function (e) {
				e.stopPropagation();

				// Reset pagination.
				if (_this.settings.pagination === true) {
					_this.paginationChange(0);
				}

				var sortMethod,
					sortVal;

				sortMethod = (typeof $(this).find(':selected').attr('data-method') !== 'undefined') ?  $(this).find(':selected').attr('data-method') : 'distance';
				sortVal = $(this).val();

				_this.settings.sortBy.method = sortMethod;
				_this.settings.sortBy.prop = sortVal;

				// Callback
				if (_this.settings.callbackSorting) {
					_this.settings.callbackSorting.call(this, _this.settings.sortBy);
				}

				if ($mapDiv.hasClass('bh-sl-map-open')) {
					_this.mapping(mappingObj);
				}
			});
		}
846841
private void advance() {
	String s = null;
	while (tokenizer.hasNext()) {
	    String nextToken = tokenizer.next();
	    // stop if the word should be returned
	    if (filter.accept(nextToken)) {
		s = nextToken;
		break;
	    }
	}
	next = s;
    }
839381
function (newPage) {
			this.writeDebug('paginationChange',arguments);

			// Page change callback
			if (this.settings.callbackPageChange) {
				this.settings.callbackPageChange.call(this, newPage);
			}

			mappingObj.page = newPage;
			this.mapping(mappingObj);
		}
1343705
private void updatePage() {
		// retrieve page
		final int retrievalPage = page == LAST_PAGE ? pageCount : page;
		final List<Row> rows;
		try {
			rows = client.getExecutor().retrieveResultPage(resultDescriptor.getResultId(), retrievalPage);
		} catch (SqlExecutionException e) {
			close(e);
			return;
		}

		// convert page
		final List<String[]> stringRows = rows
				.stream()
				.map(CliUtils::rowToString)
				.collect(Collectors.toList());

		// update results
		if (previousResultsPage == retrievalPage) {
			// only use the previous results if the current page number has not changed
			// this allows for updated results when the key space remains constant
			previousResults = results;
		} else {
			previousResults = null;
			previousResultsPage = retrievalPage;
		}

		results = stringRows;

		// check if selected row is still valid
		if (selectedRow != NO_ROW_SELECTED) {
			if (selectedRow >= results.size()) {
				selectedRow = NO_ROW_SELECTED;
			}
		}

		// reset view
		resetAllParts();
	}
767506
private SelectQuery incrementQueryPagination(SelectQuery query, SelectResultValue prevResult)
  {
    Map<String, Integer> pagingIdentifiers = prevResult.getPagingIdentifiers();
    Map<String, Integer> newPagingIdentifers = new HashMap<>();

    for (String segmentId : pagingIdentifiers.keySet()) {
      int newOffset = pagingIdentifiers.get(segmentId) + 1;
      newPagingIdentifers.put(segmentId, newOffset);
    }

    return query.withPagingSpec(new PagingSpec(newPagingIdentifers, pagingThreshold));
  }
549956
public function next()
    {
        if ($this->valid()) {
            $this->current = $this->current->getIntValue() == $this->range->getEnd()->getIntValue()
                ? null
                : new IP($this->current->getIntValue() + 1);
        }
    }
1257466
boolean advance() {
        if (header.frameCount <= 0) {
            return false;
        }

        if(framePointer == getFrameCount() - 1) {
            loopIndex++;
        }

        if(header.loopCount != LOOP_FOREVER && loopIndex > header.loopCount) {
            return false;
        }

        framePointer = (framePointer + 1) % header.frameCount;
        return true;
    }
952140
public function build()
    {
        $this->result = new PaginationResult();

        if ($this->total === 0 || $this->limit === 0 || $this->pages === 1) {
            return $this;
        }

        // Lower
        $offset = $this->current - 1;

        // -1 is simple pagination
        if ($this->total === -1) {
            $neighbours = 1;
        } else {
            $neighbours = $this->current - $this->neighbours;
            $neighbours = $neighbours < static::BASE_PAGE ? static::BASE_PAGE : $neighbours;
        }

        for ($i = $offset; $i >= $neighbours; $i--) {
            $this->result->addLower($i);
        }

        if ($neighbours - static::BASE_PAGE >= 2) {
            $this->result->setLess($neighbours - 1);
        }

        $this->result->setPrevious($this->current - 1);

        // First
        if ($this->current - $this->neighbours > static::BASE_PAGE) {
            $this->result->setFirst(static::BASE_PAGE);
        }

        // Higher
        $offset     = $this->current + 1;
        $neighbours = $this->current + $this->neighbours;
        $neighbours = $neighbours > $this->pages ? $this->pages : $neighbours;

        for ($i = $offset; $i <= $neighbours; $i++) {
            $this->result->addHigher($i);
        }

        if ($this->pages - $neighbours > 0) {
            $this->result->setMore($neighbours + 1);
        }

        // Show next button if not last page or for simple pagination
        if ($this->total === -1 || $this->current !== $this->pages) {
            $this->result->setNext($this->current + 1);
        }

        // Last
        if ($this->current + $this->neighbours < $this->pages) {
            $this->result->setLast($this->pages);
        }

        // Current
        $this->result->setCurrent($this->current);

        return $this;
    }
1122939
private void advance() {
        // If we don't have any simple graphs to return, and there are still
        // more subgraphs, then pick off the next subgraph and decompose it
        if (next.isEmpty() && subgraphIterator.hasNext()) {
            Multigraph<T,E> g = subgraphIterator.next();

            // Find all pairs of edges, checking whether the graph is a simple
            // graph already
            boolean isSimpleAlready = true;
            List<IntPair> connected = new ArrayList<IntPair>();
            for (int i : g.vertices()) {
                for (int j : g.vertices()) {
                    if (i == j)
                        break;
                    Set<E> edges = null;
                    try {
                        edges = g.getEdges(i, j);
                    } catch (NullPointerException npe) {
                        System.out.println("Bad graph? : " + g);
                        throw npe;
                    }
                    int size = edges.size();
                    if (size > 0)
                        connected.add(new IntPair(i, j));
                    if (size > 1)
                        isSimpleAlready = false;
                }
            }
            // If the subgraph was already a simple graph, then just append it
            // to the list
            if (isSimpleAlready) {
                // System.out.println("next graph was already simple: " + g);
                next.add(g);
            }
            // Otherwise, generate a recursive call to enumerate all the
            // simple graphs from this graph
            else {
                // Create an empty graph which will be populated with a new edge
                // and then copied 
                Multigraph<T,E> m = g.copy(Collections.<Integer>emptySet()); //Graphs.asMultigraph(new GenericGraph<E>());
                next.addAll(enumerateSimpleGraphs(g, connected, 0, m));
            }
        }
    }