示例#1
0
 @Override
 public Simulation next() {
   if (exprIt == null) {
     throw new RuntimeException("Iterator not initialised, please call build()");
   }
   if (current == null || !current.hasNext()) {
     if (exprIt.hasNext()) current = exprIt.next();
     else throw new NoSuchElementException();
   }
   return current.next();
 }
示例#2
0
 @Override
 public boolean hasNext() {
   return exprIt.hasNext() || (current != null && current.hasNext());
 }