Returns the next ReplicaSet which should get the request.

@return - the next ReplicaSetCircularIterator in the iterator. If there
are none then null is returned.
515257
public ServerGroup next() {
        if (entry == null) return null;
        entry = entry.next;
        return entry.element;
    }
1282442
public T next() {
		if(cachedNext == null) {
			throw new NoSuchElementException("call hasNext first!");
		}
		T o = cachedNext;
		cachedNext = null;
		return o;
	}
862781
public Object next()
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "next");
    } 
    
    Object result;
    if (hasNext())
    {
      AnycastInputHandler aih = (AnycastInputHandler) anycastIHIterator.next();
      
      result = aih.getControlAdapter();
    }
    else
    {
      result = null;
    }
    
    if (tc.isEntryEnabled())
    {
      SibTr.exit(tc, "next", result);
    } 
    return result;
  }
682159
public Iterator breadthFirst() {
        return new Iterator() {
            private final List list = new LinkedList();
            private Iterator iter = iterator();
            private GPathResult next = getNextByBreadth();

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

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

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

            private GPathResult getNextByBreadth() {
                List children = new ArrayList();
                while (this.iter.hasNext() || !children.isEmpty()) {
                    if (this.iter.hasNext()) {
                        final GPathResult node = (GPathResult) this.iter.next();
                        this.list.add(node);
                        this.list.add(this.iter);
                        children.add(node.children());
                    } else {
                        List nextLevel = new ArrayList();
                        for (Object child : children) {
                            GPathResult next = (GPathResult) child;
                            Iterator iterator = next.iterator();
                            while (iterator.hasNext()) {
                                nextLevel.add(iterator.next());
                            }
                        }
                        this.iter = nextLevel.iterator();
                        children = new ArrayList();
                    }
                }
                if (this.list.isEmpty()) {
                    return null;
                } else {
                    GPathResult result = (GPathResult) this.list.get(0);
                    this.list.remove(0);
                    this.iter = (Iterator) this.list.get(0);
                    this.list.remove(0);
                    return result;
                }
            }
        };
    }
730690
@Override
	public Object next() {
		Object object = cloner.deepClone(templateObject);

		Map<String, Object> values = nextValues();

		for (Map.Entry<String, Object> entry : values.entrySet()) {
			try {
				PropertyUtils.setProperty(object, entry.getKey(), entry.getValue());
			}
			catch (Exception e) {
				throw new RuntimeException(e);
			}
		}

		return object;
	}
1199355
public Tuple getNextUnused()
    {
    Iterator<Tuple> unused = getUnused();
    return
      unused.hasNext()
      ? unused.next()
      : null;
    }
198783
public Object next()
    {
        String result = null;

        if ( _literal != null )
        {
            result = _literal;
            _literal = null;
        }
        else if ( _token != null )
        {
            result = _token;
            _token = null;
        }
        return result;
    }
9614
public UrlSearchResult next() {
		if(cachedNext == null) {
			throw new NoSuchElementException("use hasNext!");
		}
		UrlSearchResult tmp = cachedNext;
		cachedNext = null;
		return tmp;
	}
1220961
public synchronized Object next()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "next");

    Object next = null;
    if(hasNext())
    {
      next = this.next.data;
      removable = this.next;
      this.next = null;
    }
    else
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "next", "NoSuchElementException");
      throw new NoSuchElementException(
        nls.getFormattedMessage(
          "NO_ELEMENTS_ERROR_CWSIP0601",
          null,
          null));
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "next", next);

    return next;
  }
474506
public Object next() {

        // for chained iterators
        if (chained) {
            if (it1 == null) {
                if (it2 == null) {
                    throw new NoSuchElementException();
                }

                if (it2.hasNext()) {
                    return it2.next();
                }

                it2 = null;

                next();
            } else {
                if (it1.hasNext()) {
                    return it1.next();
                }

                it1 = null;

                next();
            }
        }

        // for other itertors
        if (hasNext()) {
            return elements[i++];
        }

        throw new NoSuchElementException();
    }
1134697
public Integer next() {
		for(int i = currentIndex; i < t.size(); i++){
			if(i+timelag>=t.size()){
				return null;
			}
			if((t.get(i) != null) && (t.get(i+timelag) != null)){
				if(overlap){
					currentIndex = i+1;
				}
				else{
					currentIndex = i+timelag;
				}
				return i;
			}
		}
		
		return null;
	}
39253
public T first() {
        Iterator<T> iterator = iterator();
        return (iterator.hasNext() ? iterator.next() : null);
    }
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();
    }
809810
public String next() {
        if (next == null)
            throw new NoSuchElementException();
        String replacement = replacementMap.get(next);
        replacement = (replacement == null) ? next : replacement;
        advance();
        return replacement;
    }
1100554
protected MemberId next() {
    // If a connection was already established then use that connection.
    if (currentNode != null) {
      return currentNode;
    }

    if (!selector.hasNext()) {
      if (selector.leader() != null) {
        selector.reset(null, selector.members());
        this.currentNode = selector.next();
        this.selectionId++;
        return currentNode;
      } else {
        log.debug("Failed to connect to the cluster");
        selector.reset();
        return null;
      }
    } else {
      this.currentNode = selector.next();
      this.selectionId++;
      return currentNode;
    }
  }
859235
public ServerGroup next(ServerGroup ignoreReplicaSet) {
        if (entry == null) return null;
        entry = entry.next;
        if (entry.element.equals(ignoreReplicaSet)) {
            return entry.next.element;
        } else {
            return entry.element;
        }
    }
71338
public Promise getNext() {
        while( !lock.compareAndSet(false,true) ) {}
        try {
            if (nextFuture == null)
                return new Promise();
            else
                return (Promise) nextFuture;
        } finally {
            lock.set(false);
        }
    }