@Test public void testNone() { List<Warning> fakes = asList(new FakeWarning(false, "Inactive warning"), new FakeWarning(false, "Other inactive warning") ); Iterator<Warning> iterator = new ActiveWarnings(fakes).iterator(); assertFalse(iterator.hasNext()); }
@Override public Iterator<Warning> iterator() { return stream(warnings.spliterator(), false) .filter(Warning::active) .iterator(); }
ActiveWarnings implements Iterable<Warning> { @Override public Iterator<Warning> iterator() { return stream(warnings.spliterator(), false) .filter(Warning::active) .iterator(); } }
ActiveWarnings implements Iterable<Warning> { @Override public Iterator<Warning> iterator() { return stream(warnings.spliterator(), false) .filter(Warning::active) .iterator(); } ActiveWarnings(Iterable<Warning> warnings); }
ActiveWarnings implements Iterable<Warning> { @Override public Iterator<Warning> iterator() { return stream(warnings.spliterator(), false) .filter(Warning::active) .iterator(); } ActiveWarnings(Iterable<Warning> warnings); @Override Iterator<Warning> iterator(); }
ActiveWarnings implements Iterable<Warning> { @Override public Iterator<Warning> iterator() { return stream(warnings.spliterator(), false) .filter(Warning::active) .iterator(); } ActiveWarnings(Iterable<Warning> warnings); @Override Iterator<Warning> iterator();  }