boolean emptyIterator() { for (int i = 0; i < JoinIteratorNode.this.getChildCount(); i++) { if (((ResumableIterator) JoinIteratorNode.this .getChildAt(i)).size() == 0) { return true; } } return false; } };
/** * If the iterator isn't empty then all the iterators contained within it * are the same length, can therefore just ask the first one */ public synchronized boolean hasNext() { return (emptyIterator()) ? false : iterators()[0].hasNext(); }
/** * Returns an array of items created by calling the next() method of each * contained iterator */ public synchronized Object next() throws NoSuchElementException { Object[] results = new Object[iterators().length]; for (int i = 0; i < iterators().length; i++) { results[i] = iterators()[i].next(); } return results; }
/** * All iterators are the same size */ public int size() { return (emptyIterator()) ? 0 : iterators()[0].size(); }
/** * The join has next if any iterator within it has a next value of true */ public synchronized boolean hasNext() { if (emptyIterator()) { return false; } for (int i = 0; i < iterators().length; i++) { if (iterators()[i].hasNext()) { return true; } } return false; }
/** * Return the size of the underlying iterator */ public int size() { return iterator.size(); }
/** * Delegate to the underlying iterator */ public boolean hasNext() { return iterator.hasNext(); }
/** * Return the current position within this iterator */ public int[] getCurrentLocation() { return iterator.getCurrentLocation(); }
/** * Return the size of the underlying JoinIterator */ public int size() { return iterator.size(); }
/** * Delegates to contained LockStepIterator */ public boolean hasNext() { return iterator.hasNext(); }
/** * Remove operation not supported */ public void remove() throws UnsupportedOperationException { iterator.remove(); }
boolean emptyIterator() { return (LockStepIteratorNode.this.getChildCount() == 0); } };
/** * Delegates to contained LockStepIterator */ public void reset() { iterator.reset(); }
/** * Delegates to contained LockStepIterator */ public int size() { return iterator.size(); }
/** * Return the current location */ public int[] getCurrentLocation() { return iterator.getCurrentLocation(); }
/** * Reset the underlying JoinIterator */ public void reset() { iterator.reset(); }
/** * Reset the underlying iterator to its initial state */ public void reset() { iterator.reset(); }