code: public QueryTerm next() {
  		if (nextElement == null) {
  			throw new NoSuchElementException();
  		}
  		QueryTerm t = nextElement;
  		nextElement = findNext();
  		return t;
  	}
docs: To avoid duplicate work in next() and hasNext() (both can locate the next element),
  we automatically move to the next element when the previous is returned. The hasNext()
  method then becomes trivial.
  @return next element.