コード例 #1
0
 V nextValue() {
   if (branch) {
     return branch1.nextValue();
   }
   V value = branch0.nextValue();
   if (value != NONEXISTENT) {
     return value;
   }
   branch = true;
   return branch1.nextValue();
 }
コード例 #2
0
 public boolean hasNext() {
   while (next == NONEXISTENT) {
     if (tableIdx == table.array.length() && tableIterator == null) {
       return false;
     }
     if (tableIterator == null) {
       int rowIdx = tableIdx++;
       if (table.array.get(rowIdx) != null) {
         tableIterator = createRowIterator(table, rowIdx);
       }
     }
     if (tableIterator != null) {
       next = tableIterator.nextValue();
       if (next == NONEXISTENT) {
         tableIterator = null;
       }
     }
   }
   return true;
 }