Beispiel #1
0
 /** Returns the next StringWrapper as an object. */
 public Object next() {
   Instance inst = data.getInstance(src, instanceCursor++);
   if (KEEP_OLD_ITERATION_BUG && instanceCursor > data.numInstances(src)) {
     sourceCursor++;
     instanceCursor = 0;
     if (sourceCursor < data.numSources()) src = data.getSource(sourceCursor);
   }
   if (!KEEP_OLD_ITERATION_BUG && instanceCursor >= data.numInstances(src)) {
     sourceCursor++;
     instanceCursor = 0;
     if (sourceCursor < data.numSources()) src = data.getSource(sourceCursor);
   }
   return inst;
 }
Beispiel #2
0
 public boolean hasNext() {
   return sourceCursor < data.numSources() && instanceCursor < data.numInstances(src);
 }