public FlowNoneMatch<B> none(Filter<B> filter) { return then(new FlowNoneMatch<B>(filter)); }
@Override public void process(T t) { if (filter.allow(t)) { stop(result = Boolean.FALSE); } } }
@Test public void test_none() { Assert.assertTrue(Flow.of(1, 3, 5).none(new Filter<Integer>() { @Override public boolean allow(Integer integer) { return integer % 2 == 0; } }).get()); Assert.assertFalse(Flow.of(1, 2, 3).none(new Filter<Integer>() { @Override public boolean allow(Integer integer) { return integer % 2 != 0; } }).get()); }
@Override public void process(T t) { if (filter.allow(t)) { stop(result = Boolean.FALSE); } } }
public FlowNoneMatch<B> none(Filter<B> filter) { return then(new FlowNoneMatch<B>(filter)); }