V nextValue() { if (branch) { return branch1.nextValue(); } V value = branch0.nextValue(); if (value != NONEXISTENT) { return value; } branch = true; return branch1.nextValue(); }
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; }