Source of 15.5.java


  1: public T next()
  2: {
  3:    if (hasNext())
  4:    {
  5:       wasNextCalled = true;
  6:       nextPosition++;
  7:       return list.getEntry(nextPosition);
  8:    }
  9:    else
 10:       throw new NoSuchElementException("Illegal call to next(); " +
 11:                                        "iterator is after end of list.");
 12: } // end next
 13: // Version 4.0