public T next()
{
   if (hasNext())
   {
      wasNextCalled = true;
      nextPosition++;
      return list.getEntry(nextPosition);
   }
   else
      throw new NoSuchElementException("Illegal call to next(); " +
                                       "iterator is after end of list.");
} // end next
// Version 4.0
