/* (non-Javadoc)
@see java.util.Enumeration#nextElement()
513119
@Override
	public AbstractMessage nextElement()
	{
		if (endOfQueueReached)
			throw new NoSuchElementException();
			
		try
		{
			checkNotClosed();
			AbstractMessage msg = fetchNext();
			if (msg != null)
			{
				nextMessage = null; // Consume fetched message

				// Make sure the message is fully deserialized and marked as read-only
				msg.ensureDeserializationLevel(MessageSerializationLevel.FULL);
				msg.markAsReadOnly();
				
				return msg;
			}
			
			throw new NoSuchElementException();
		}
		catch (NoSuchElementException e)
		{
			throw e;
		}
		catch (JMSException e)
		{
			throw new IllegalStateException(e.toString());
		}
	}
619712
@Override
    public String next() {
        if (hasNext()) {
            if (enumerationSize == NULL_LOCALE_ENUMERATION_SIZE) {
                cursor++;
                return templateName;
            }
            final String language = matcher.group(1);
            final String country = matcher.group(2);
            switch (cursor) {
                case 0: cursor++; return templateName + FILE_SEPARATOR + language + FILE_SEPARATOR + country;
                case 1: cursor++; return templateName + FILE_SEPARATOR + language + UNDERSCORE + country;
                case 2: cursor++; return templateName + FILE_SEPARATOR + language;
                case 3: cursor++; return templateName + UNDERSCORE + language + UNDERSCORE + country;
                case 4: cursor++; return templateName + UNDERSCORE + language;
                case 5: cursor++; return templateName;
            }
        }
        String message = "No next available template name combination.";
        LOGGER.error(message);
        throw new IllegalStateException(message);
    }
227862
public static void insertAfter(Element newElement, Element after) {
        after.parentNode.insertBefore(newElement, after.nextSibling);
    }
1215532
public synchronized void addElement(T element) {
    checkArgument(
        element.getNext() == null && element.getPrev() == null && element != head,
        "Element already in a list.");
    size++;
    if (head == null) {
      head = element;
    } else {
      head.setPrev(element);
      element.setNext(head);
      head = element;
    }
  }
1282442
public T next() {
		if(cachedNext == null) {
			throw new NoSuchElementException("call hasNext first!");
		}
		T o = cachedNext;
		cachedNext = null;
		return o;
	}
438915
public function next()
    {
        $operation   = $this->operation;
        $this->value = $operation($this->value);
        $this->elementsGenerated++;
    }
1098106
@Override
    protected Path findNext(){
        E elem = delegate.next();
        return elem==null ? null : path.append(elem, index()+1);
    }
1043656
public E next() {
		if(!hasNext()) {
			throw new NoSuchElementException();
		}
		E retObject = next;
		next = null;
		return retObject;
	}
738850
public void processElement(OutputStream outputStream, Object element) throws IOException {
        if (canProcess(element)) {
            process(outputStream, element);
        } else {
            if (next != null) {
                this.next.processElement(outputStream, element);
            }
        }
    }
857821
public T next(T ignoreReplicaSet) {
        if (entry == null) return null;
        entry = entry.next;
        if (entry.element.equals(ignoreReplicaSet)) {
            return entry.next.element;
        } else {
            return entry.element;
        }
    }
729359
function() {
         this._nextCalled = true;
         if(this._collection.size() > 0) {
             if(this._hasNextCalled) {
                 this._hasNextCalled = false;
                 this._pos --;
             }

             this._pos ++;
             this._nextElement = this._collection.getAll()[this._pos];

             if(this._nextElement !== undefined) {
                 return this._nextElement;
             } else {
                 throw new Error("No such element.");
             }
         }
     }
64394
public <T> T[] nextArray(@NonNull Class<T> elementType) throws IOException {
      return nextArray(StringUtils.EMPTY, elementType);
   }
511830
@Override
    protected E findNext(){
        while(true){
            E elem = delegate.next();
            if(elem==null || filter.select(elem))
                return elem;
        }
    }
727191
public boolean next()
    {
        if (this.iter == null) {
            this.iter = new ArrayList<>(this.values).iterator();
        }
        final boolean ret = this.iter.hasNext();
        if (ret) {
            this.current = this.iter.next();
        }
        return ret;
    }
890567
public Object nextElement()
    {
        try {
            return nextElementR();
        } catch (NoMoreElementsException e) {
            // FFDCFilter.processException(e, CLASS_NAME + ".nextElement", "109", this);
            throw new NoSuchElementException();
        } catch (EnumeratorException e) {
            // FFDCFilter.processException(e, CLASS_NAME + ".nextElement", "112", this);
            throw new RuntimeException(e.toString());
        } catch (NoSuchObjectException e) {
            // FFDCFilter.processException(e, CLASS_NAME + ".nextElement", "115", this);
            throw new IllegalStateException("Cannot access finder result outside transaction");
        } catch (RemoteException e) {
            // FFDCFilter.processException(e, CLASS_NAME + ".nextElement", "118", this);
            throw new RuntimeException(e.toString());
        }
    }
1143876
@Override
  public IndexTreePath<E> next() {
    Iterator<IndexTreePath<E>> enumeration = queue.peek();
    IndexTreePath<E> nextPath = enumeration.next();

    Iterator<IndexTreePath<E>> children;
    if(nextPath.getEntry() instanceof LeafEntry) {
      children = EMPTY_ENUMERATION;
    }
    else {
      N node = index.getNode(nextPath.getEntry());
      children = node.children(nextPath);
    }

    if(!enumeration.hasNext()) {
      queue.remove();
    }
    if(children.hasNext()) {
      queue.offer(children);
    }
    return nextPath;
  }
937366
public boolean nextInnerElement(ElementContext parent, String childName) throws XMLException, IOException {
		while (nextInnerElement(parent)) {
			if (event.text.equals(childName))
				return true;
		}
		return false;
	}