@Test public void iteratorWithNoLines() { LinesIterable iterable = new LinesIterable(LineSequence.create(""), Predicates.<Line> alwaysTrue()); Iterator<Line> iterator = iterable.iterator(); assertNotNull(iterator); assertFalse(iterator.hasNext()); thrown.expect(NoSuchElementException.class); iterator.next(); }
@Override public Iterator<Line> iterator() { return new LinesIterator(); }
LinesIterable implements Iterable<Line> { @Override public Iterator<Line> iterator() { return new LinesIterator(); } }
LinesIterable implements Iterable<Line> { @Override public Iterator<Line> iterator() { return new LinesIterator(); } LinesIterable(LineSequence lineSequence, Predicate<Line> predicate); }
LinesIterable implements Iterable<Line> { @Override public Iterator<Line> iterator() { return new LinesIterator(); } LinesIterable(LineSequence lineSequence, Predicate<Line> predicate); @Override Iterator<Line> iterator(); }
LinesIterable implements Iterable<Line> { @Override public Iterator<Line> iterator() { return new LinesIterator(); } LinesIterable(LineSequence lineSequence, Predicate<Line> predicate); @Override Iterator<Line> iterator();  }