@Test public void testApplyWithEmptyPredicateList(){ StreamPredicate[] predicates = new StreamPredicate[0]; OrPredicate orPredicate = new OrPredicate(predicates); assertFalse(orPredicate.apply(Collections.emptyList())); }
@Override public boolean apply(Collection<Attribute> attributes) { for (StreamPredicate predicate : predicates) { if (predicate.apply(attributes)) { return true; } } return false; }
OrPredicate implements StreamPredicate, CompoundPredicate { @Override public boolean apply(Collection<Attribute> attributes) { for (StreamPredicate predicate : predicates) { if (predicate.apply(attributes)) { return true; } } return false; } }
OrPredicate implements StreamPredicate, CompoundPredicate { @Override public boolean apply(Collection<Attribute> attributes) { for (StreamPredicate predicate : predicates) { if (predicate.apply(attributes)) { return true; } } return false; } OrPredicate();  OrPredicate(StreamPredicate... predicates); }
OrPredicate implements StreamPredicate, CompoundPredicate { @Override public boolean apply(Collection<Attribute> attributes) { for (StreamPredicate predicate : predicates) { if (predicate.apply(attributes)) { return true; } } return false; } OrPredicate();  OrPredicate(StreamPredicate... predicates); @Override StreamPredicate[] getPredicates(); @Override void setPredicates(StreamPredicate[] predicates); @Override boolean apply(Collection<Attribute> attributes); }
OrPredicate implements StreamPredicate, CompoundPredicate { @Override public boolean apply(Collection<Attribute> attributes) { for (StreamPredicate predicate : predicates) { if (predicate.apply(attributes)) { return true; } } return false; } OrPredicate();  OrPredicate(StreamPredicate... predicates); @Override StreamPredicate[] getPredicates(); @Override void setPredicates(StreamPredicate[] predicates); @Override boolean apply(Collection<Attribute> attributes);  }