@Test public void should_create_iterator_of_events() throws Exception { XMLEventReader xmlEventReader = createXmlEventReader(PropertiesUtils.getResourceAsStream("logbook_events.xml")); LogBookEventIterator logbookEvents = new LogBookEventIterator(xmlEventReader); assertThat(logbookEvents.stream().collect(Collectors.toList())).hasSize(2); }
public Stream<LogbookEvent> stream() { return StreamSupport.stream(spliterator(), false); }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { public Stream<LogbookEvent> stream() { return StreamSupport.stream(spliterator(), false); } }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { public Stream<LogbookEvent> stream() { return StreamSupport.stream(spliterator(), false); } LogBookEventIterator(XMLEventReader reader); }
LogBookEventIterator implements Iterator<LogbookEvent>, Iterable<LogbookEvent> { public Stream<LogbookEvent> stream() { return StreamSupport.stream(spliterator(), false); } 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> { public Stream<LogbookEvent> stream() { return StreamSupport.stream(spliterator(), false); } LogBookEventIterator(XMLEventReader reader); @Override boolean hasNext(); @Override LogbookEvent next(); @Override Iterator<LogbookEvent> iterator(); @Override Spliterator<LogbookEvent> spliterator(); Stream<LogbookEvent> stream();  }