Move forward to next leaf.
5029
public function next()
    {
        if (is_null($this->current)) {
            $this->current = current($this->children);

            return;
        }
        if ($this->current instanceof RecursiveLeafInterface) {
            $this->current->next();
            if ($this->current->valid()) {
                return;
            }
        }
        $this->current = next($this->children);
    }
654280
def walk_tree(root):
    """"""
    yield root

    for child in root.children:
        for el in walk_tree(child):
            yield el
1153290
def advance(self, height, ignore_overflow=False):
        """"""
        if height <= self.remaining_height:
            self._self_cursor.grow(height)
        elif ignore_overflow:
            self._self_cursor.grow(float(self.remaining_height))
        else:
            raise ContainerOverflow(self.page.number)
637667
public void updateStartEnd() {
        ArrayList<IntBinaryTree> leaves = getLeaves();
        for (int i=0; i<leaves.size(); i++) {
            IntBinaryTree leaf = leaves.get(i);
            leaf.start = i;
            leaf.end = i+1;
        }
        postOrderTraversal(new UpdateStartEnd());
    }
1309741
def advance(self):
        """"""
        elem = next(self._iterable)
        for deque in self._deques:
            deque.append(elem)
943391
public function advance(): void
	{
		$this->progress++;

		if($this->progress === $this->items || ($this->progress % $this->redrawRate) === 0)
		{
			$this->draw();
		}
	}
252993
public function next()
    {
        if ($this->_skipNextIteration) {
            $this->_skipNextIteration = false;
            return;
        }
        next($this->_data);
        $this->_index++;
    }
133121
public function next()
    {
        if ($this->x + 1 < $this->width) {
            $this->x++;
        } else {
            $this->x = 0;
            $this->y++;
        }

        $this->index++;
    }
411349
def leaves(self):
        ""
        for child in self.children:
            for x in child.leaves():
                yield x
        if not self.children:
            yield self
299585
void successor()
    {
        Object[] node = currentNode();
        int i = currentIndex();

        if (!isLeaf(node))
        {
            // if we're on a key in a branch, we MUST have a descendant either side of us,
            // so we always go down the left-most child until we hit a leaf
            node = (Object[]) node[getBranchKeyEnd(node) + i + 1];
            while (!isLeaf(node))
            {
                push(node, -1);
                node = (Object[]) node[getBranchKeyEnd(node)];
            }
            push(node, 0);
            return;
        }

        // if we haven't reached the end of this leaf, just increment our index and return
        i += 1;
        if (i < getLeafKeyEnd(node))
        {
            // moved to the next key in the same leaf
            setIndex(i);
            return;
        }

        // we've reached the end of this leaf,
        // so go up until we reach something we've not finished visiting
        while (!isRoot())
        {
            pop();
            i = currentIndex() + 1;
            node = currentNode();
            if (i < getKeyEnd(node))
            {
                setIndex(i);
                return;
            }
        }

        // we've visited the last key in the root node, so we're done
        setIndex(getKeyEnd(node));
    }
626443
public function next()
    {
        try {
            $this->current = $this->map->successor($this->current);
        } catch (\OutOfBoundsException $e) {
            $this->current = null;
        }

        $this->index++;
    }
290173
private void go() {
        if (navigateEvent != null) {
            navigationManager.postEvent2C(navigateEvent);

            if (navigationManager.logger.isTraceEnabled()) {
                if (navigateEvent instanceof NavigationManager.Event.OnLocationForward) {
                    NavigationManager.Event.OnLocationForward event = (NavigationManager.Event.OnLocationForward) navigateEvent;
                    String lastLocId = event.getLastValue() == null ? null
                            : event.getLastValue().getLocationId();
                    navigationManager.logger.trace("Nav Manager: Forward: {} -> {}", lastLocId,
                            event.getCurrentValue().getLocationId());
                }
            }

            if (navigateEvent instanceof NavigationManager.Event.OnLocationBack) {
                if (navigationManager.logger.isTraceEnabled()) {
                    NavigationManager.Event.OnLocationBack event = (NavigationManager.Event.OnLocationBack) navigateEvent;
                    NavLocation lastLoc = event.getLastValue();
                    NavLocation currentLoc = event.getCurrentValue();
                    navigationManager.logger.trace("Nav Manager: Backward: {} -> {}",
                            lastLoc.getLocationId(),
                            currentLoc == null ? "null" : currentLoc.getLocationId());
                }

                checkAppExit(sender);
            }
        }
        dumpHistory();
    }
440032
public void nextState(IncEvalState prev, IncEvalState next, Object continuation,
      Environment env, Object denotation, Object diagram, Object otherArgs, LogFunction log) {
    next.set(continuation, env, denotation, diagram, prev.getProb(), null);
  }
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));
        }
1202912
public function advance() : void
    {
        if ($this->cursor < count($this->stream->getTokens()) - 1) {
            ++$this->cursor;
        }
    }
163213
public function next()
	{
		$this->key++;
		$this->current = $this->current->add($this->interval);
	}
271007
public function next()
    {
        $this->position++;
        $this->generator->next();
        $this->currentData = $this->generator->current();
    }