public T next() {
   if (position == null) {
     position = list.first();
   } else {
     position = list.next(position);
   }
   return position.element();
 }
 public boolean hasNext() {
   if (position == null) {
     return !list.isEmpty();
   } else {
     try {
       list.next(position);
     } catch (RuntimeException e) {
       return false;
     }
   }
   return true;
 }