@Test public void should_return_empty_iterator_when_no_events() throws Exception { XMLEventReader xmlEventReader = createXmlEventReader(new ByteArrayInputStream("<LogBook></LogBook>".getBytes())); LogBookEventIterator logbookEvents = new LogBookEventIterator(xmlEventReader); assertThat(logbookEvents.iterator()).isEmpty(); }
@Override public Iterator<LogbookEvent> iterator() { return this; }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { @Override public Iterator<LogbookEvent> iterator() { return this; } }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { @Override public Iterator<LogbookEvent> iterator() { return this; } LogBookEventIterator(XMLEventReader reader); }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { @Override public Iterator<LogbookEvent> iterator() { return this; } LogBookEventIterator(XMLEventReader reader); @Override boolean hasNext(); @Override LogbookEvent next(); @Override Iterator<LogbookEvent> iterator(); @Override Spliterator<LogbookEvent> spliterator(); Stream<LogbookEvent> stream(); }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { @Override public Iterator<LogbookEvent> iterator() { return this; } LogBookEventIterator(XMLEventReader reader); @Override boolean hasNext(); @Override LogbookEvent next(); @Override Iterator<LogbookEvent> iterator(); @Override Spliterator<LogbookEvent> spliterator(); Stream<LogbookEvent> stream();  }