@Test public void testMultipleEmptyIterators() { List<Integer> empty = Lists.newArrayList(); MergeTwoIterator<Integer> merged = new MergeTwoIterator<Integer>(empty.iterator(), empty.iterator(), integerComparator); assertFalse(merged.hasNext()); }
@Override public boolean hasNext() { return nexta != null || nextb != null; }
MergeTwoIterator implements Iterator<T> { @Override public boolean hasNext() { return nexta != null || nextb != null; } }
MergeTwoIterator implements Iterator<T> { @Override public boolean hasNext() { return nexta != null || nextb != null; } MergeTwoIterator(Iterator<T> a, Iterator<T> b, Comparator<? super T> comparator); }
MergeTwoIterator implements Iterator<T> { @Override public boolean hasNext() { return nexta != null || nextb != null; } MergeTwoIterator(Iterator<T> a, Iterator<T> b, Comparator<? super T> comparator); @Override boolean hasNext(); @Override T next(); }
MergeTwoIterator implements Iterator<T> { @Override public boolean hasNext() { return nexta != null || nextb != null; } MergeTwoIterator(Iterator<T> a, Iterator<T> b, Comparator<? super T> comparator); @Override boolean hasNext(); @Override T next();  }