Returns the next element in the iterator.

@return The next element of the iterator. Never <code>null</code>.
162704
@Nonnull
  public ICommonsList <String> next ()
  {
    final ICommonsList <String> ret = m_aNextLine;
    if (ret == null)
      throw new NoSuchElementException ();

    try
    {
      m_aNextLine = m_aReader.readNext ();
    }
    catch (final IOException ex)
    {
      throw new IllegalStateException ("Failed to read next CSV line", ex);
    }
    return ret;
  }
97632
public Iterator iterator()
   {
      if (tc.isEntryEnabled()) SibTr.entry(tc, "iterator");
      if (tc.isEntryEnabled()) SibTr.exit(tc, "iterator");

      return map.values().iterator();
   }
1293855
public final GraphIterationElement<ST, PT> nextElement() {
		if (!this.courseModel.isEmpty()) {
			final GraphIterationElement<ST, PT> theElement = this.courseModel.removeNextIterationElement();
			if (theElement != null) {
				final List<GraphIterationElement<ST, PT>> list = getNextSegments(true, theElement);
				final Iterator<GraphIterationElement<ST, PT>> iterator;
				boolean hasFollowingSegments = false;
				GraphIterationElement<ST, PT> elt;

				if (this.courseModel.isReversedRestitution()) {
					iterator = new ReverseIterator<>(list);
				} else {
					iterator = list.iterator();
				}

				while (iterator.hasNext()) {
					elt = iterator.next();
					if (canGotoIntoElement(elt)) {
						hasFollowingSegments = true;
						this.courseModel.addIterationElement(elt);
						if (!this.allowManyReplies) {
							this.visited.add(elt);
						}
					}
				}

				theElement.setTerminalSegment(!hasFollowingSegments);
				theElement.replied = true;
				this.current = theElement;
				return this.current;
			}
		}
		clear();
		throw new NoSuchElementException();
	}
1087581
@Override
  public T next() {
    Assert.isTrue(hasNext(), new NoSuchElementException("The iteration has no more elements!"));
    T nextValue = iteratorList.get(currentIteratorIndex).next();
    currentIteratorIndex = (++currentIteratorIndex % iteratorList.size());
    nextCalled.set(true);
    return nextValue;
  }
1287758
public Node nextNode() {

		if (currentNode == null)
			return null;

		Node result = getFirstChild(currentNode);

		if (result != null) {
			currentNode = result;
			return result;
		}

		result = getNextSibling(currentNode);

		if (result != null) {
			currentNode = result;
			return result;
		}

		// return parent's 1st sibling.
		Node parent = getParentNode(currentNode);
		while (parent != null) {
			result = getNextSibling(parent);
			if (result != null) {
				currentNode = result;
				return result;
			} else {
				parent = getParentNode(parent);
			}
		}

		// end , return null
		return null;
	}
224435
public Iterator iterator() {
        return new Iterator() {
            private LeftTupleSinkNode currentNode = null;
            private LeftTupleSinkNode nextNode    = getFirst();

            public boolean hasNext() {
                return (this.nextNode != null);
            }

            public Object next() {
                this.currentNode = this.nextNode;
                if ( this.currentNode != null ) {
                    this.nextNode = this.currentNode.getNextLeftTupleSinkNode();
                } else {
                    throw new NoSuchElementException( "No more elements to return" );
                }
                return this.currentNode;
            }

            public void remove() {
                if ( this.currentNode != null ) {
                    LeftTupleSinkNodeList.this.remove( this.currentNode );
                    this.currentNode = null;
                } else {
                    throw new IllegalStateException( "No item to remove. Call next() before calling remove()." );
                }
            }
        };
    }
656702
def next(self):
        
        try:
            self.event, self.element = next(self.iterator)
            self.elementTag = clearTag(self.element.tag)
        except StopIteration:
            clearParsedElements(self.element)
            raise StopIteration
        return self.event, self.element, self.elementTag
1154141
@Override
    public Sequence<T> nextSequence() {
        Sequence<T> sequence = currentIterator.next();
        sequence.setSequenceId(tagger.getAndIncrement());
        return sequence;
    }
84499
public Iterator childNodes() {
        return new Iterator() {
            private final Iterator iter = Node.this.children.iterator();
            private Object nextElementNodes = getNextElementNodes();

            public boolean hasNext() {
                return this.nextElementNodes != null;
            }

            public Object next() {
                try {
                    return this.nextElementNodes;
                } finally {
                    this.nextElementNodes = getNextElementNodes();
                }
            }

            public void remove() {
                throw new UnsupportedOperationException();
            }

            private Object getNextElementNodes() {
                while (iter.hasNext()) {
                    final Object node = iter.next();
                    if (node instanceof Node) {
                        return node;
                    }
                }
                return null;
            }
        };
    }
667534
protected int getNextNode()
  {
    if (m_foundLast)
      return DTM.NULL;

    int next = m_iterator.next();
    
    if (m_isFresh)
      m_isFresh = false;

    if (DTM.NULL == next)
      this.m_foundLast = true;

    return next;
  }
127721
@Override
	public Integer next() {
		if (!hasNext()) {
			throw new NoSuchElementException(toString() + " ended");
		}

		current = next;
		next = next + increment;

		return current();
	}
151451
@Override
    public Optional<E> next() {
        if (iterator.hasNext()) {
            return Optional.of(iterator.next());
        }
        return Optional.empty();
    }
752927
@Override
	public T next() {
		if (hasNext()) {
			T current = next;
			next = null;
			return current;
		} else {
			throw new NoSuchElementException();
		}
	}
619496
public Object next() throws java.util.NoSuchElementException {
        Object element = null;
        if (nextElement != null) {
            element = nextElement;
            nextElement = null;
        } else {
            element = getNextElement();
            if (element == null) {
                throw new java.util.NoSuchElementException();
            }
        }
        return element;
    }
1198548
public Optional<E> getNext() {
        return Optional.of(currentIndex).filter(getLess(linkedList.size() - 1))
                .map(i -> linkedList.get(++currentIndex));
    }
198783
public Object next()
    {
        String result = null;

        if ( _literal != null )
        {
            result = _literal;
            _literal = null;
        }
        else if ( _token != null )
        {
            result = _token;
            _token = null;
        }
        return result;
    }
682642
public Iterator<Node> iterator() {

        return new Iterator<Node>() {
            private int currentIndex = 0;
            
            public boolean hasNext() {
                return currentIndex < nodeList.getLength();
            }
            
            public Node next() {
                Node next = nodeList.item(currentIndex);
                currentIndex++;
                if (next == null) {
                    throw new NoSuchElementException("No element found for index: " + currentIndex);
                }
                return next;
            }
            
            public void remove() {
                throw new UnsupportedOperationException("IterableNodeList does not support remove");
            }
        };
    }