Returns the next path that meets the requirements.

@throws NoSuchElementException if called when no further paths exist
977354
public DependencyPath next() {
        if (next == null)
            throw new NoSuchElementException("No further paths to return");
        DependencyPath p = next;
        advance();
        return p;
    }
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;
  }
7997
public Node nextNode() throws NoSuchElementException
   {
      initialize();
      if (next == null)
      {
         throw new NoSuchElementException();
      }
      NodeImpl n = next;
      fetchNext();
      return n;
   }
1018783
public Object nextElement()
    {
        try
        {
            if (!hasCalledCheck)
            {    
                hasMoreElements();
            }    
            hasCalledCheck = false;
            if (hasNext)
            {
                Identity oid = getIdentityFromResultSet();
                Identity[] args = {oid};
                return this.constructor.newInstance(args);
            }
            else
                throw new NoSuchElementException();
        }
        catch (Exception ex)
        {
            LoggerFactory.getDefaultLogger().error(ex);
            throw new NoSuchElementException();
        }
    }
462919
@Override
	public Long next() {
		if (!hasNext()) {
			throw new NoSuchElementException(toString() + " ended");
		}

		current = next;
		next = next + increment;

		return current();
	}
12071
public CrawlDatum next(){
        int topN = getConf().getTopN();
        int maxExecuteCount = getConf().getOrDefault(Configuration.KEY_MAX_EXECUTE_COUNT, Integer.MAX_VALUE);

        if(topN > 0 && totalGenerate >= topN){
            return null;
        }

        CrawlDatum datum;
        while (true) {
            try {
                datum = nextWithoutFilter();
                if (datum == null) {
                    return datum;
                }
                if(filter == null || (datum = filter.filter(datum))!=null){
                    if (datum.getExecuteCount() > maxExecuteCount) {
                        continue;
                    }
                    totalGenerate += 1;
                    return datum;
                }

            } catch (Exception e) {
                LOG.info("Exception when generating", e);
                return null;
            }

        }
    }
804086
public String next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }

        String next = this.next;
        this.next = fetchNext();

        return next;
    }
1335360
public List<int[]> getNPaths(int n)
    {
        List<int[]> result = new ArrayList<int[]>();

        n = Math.min(Predefine.MAX_SEGMENT_NUM, n);
        for (int i = 0; i < N && result.size() < n; ++i)
        {
            List<int[]> pathList = getPaths(i);
            for (int[] path : pathList)
            {
                if (result.size() == n) break;
                result.add(path);
            }
        }

        return result;
    }
669305
@SuppressWarnings("unchecked")
	public REC next() {
		checkDirection(true);

		ORecordInternal<?> record = getRecord();

		// ITERATE UNTIL THE NEXT GOOD RECORD
		while (hasNext()) {
			record = getTransactionEntry();
			if (record != null)
				return (REC) record;

			if ((record = readCurrentRecord(null, +1)) != null)
				// FOUND
				return (REC) record;
		}

		throw new NoSuchElementException();
	}
315756
@Override
    public List<Writable> next() {
        if(!hasNext()){ //Also triggers prefetch
            throw new NoSuchElementException("No next element");
        }
        List<Writable> out = next.getRecord();
        next = null;
        return out;
    }
111356
public V next() {

        Collection<? extends V> collection = this.collection;
        V offset = this.offset;

        if (offset != null) {
            boolean accept = false;
            for (V element : collection) {
                if (element == offset) {
                    accept = true;
                    continue;
                }

                if (accept) {
                    return this.offset = element;
                }
            }
        }

        return this.offset = collection.iterator().next();
    }
900173
public T next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        // 'next' is guaranteed non-null by a hasNext() which returned true
        T returnObj = this.next;
        this.next = null;
        return returnObj;
    }
337750
private QueryTerm findNext() {
		//Walk down first branch
		if (askFirstA[askFirstD]) {
			while (currentNode.firstTerm() == null) {
				//remember that we already walked down the first branch
				askFirstD++;
				currentNode = currentNode.firstNode();
			}
			askFirstA[askFirstD] = false;
			return currentNode.firstTerm();
		} 

		//do we have a second branch?
		if (currentNode.isUnary()) {
			return findUpwards();
		}

		//walk down second branch
		if (currentNode.secondTerm() != null) {
			//dirty hack
			if (currentNode.secondTerm() != nextElement) {
				return currentNode.secondTerm();
			}
			//else: we have been here before!
			//walk back up
			return findUpwards();
		} else {
			currentNode = currentNode.secondNode();
			askFirstD++;
			return findNext();
		}
	}
166333
@Override
    public Path getPath(final String first, final String... more) {

        this.checkClosed();

        if (first == null) {
            throw new IllegalArgumentException("At least one path component must be specified");
        }

        final String merged = this.merge(first, more);
        final Path path = new ShrinkWrapPath(merged, this);

        return path;
    }
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;
  }
427310
public String next() {
	if (!hasNext()) {
	    throw new NoSuchElementException();
	}

	String token = tokenizer.next();

	// Determine whether the next token to return could be the start of a
	// recognized compound token
	CompoundTokens compounds = compoundTokens.get(token);
	
	// Determine how many tokens are needed at most and see if any grouping
	// exists
	if (compounds != null) {
	    List<String> nextTokens = tokenizer.peek(compounds.maxTokens());
	    Duple<Integer,String> compound = compounds.findMatch(nextTokens);
	    if (compound != null) {
		// shift off the number of extra tokens in the compound
		for (int i = 0; i < compound.x; ++i) 
		    tokenizer.next();
		return compound.y;
	    }
	    else return token;
	}
	
	// If there was no possibility of grouping this token, then return it by
	// itself
	return token;
    }
16280
public Entry getNext()
  {
    checkEntryParent();
    
    Entry entry = null;
    
    if(!isLast())
    {
      entry = next;
    }

    return entry;
  }