Ejemplo n.º 1
0
 @Override
 public Event next() {
   if (!walker.isOpen()) throw new IllegalStateException();
   fetchNextIfNeeded();
   if (next == null) throw new NoSuchElementException();
   Event result = next;
   next = null;
   return result;
 }
Ejemplo n.º 2
0
 @Override
 public boolean hasNext() {
   if (!walker.isOpen()) throw new IllegalStateException();
   fetchNextIfNeeded();
   return next != null;
 }