TypePredicateList implements Predicate<TreeValues> { @Override public boolean test(TreeValues possibleValues) { for (Predicate<TreeValues> predicate : this.predicateList) { if (predicate.test(possibleValues)) { return true; } } return false; } TypePredicateList(Predicate<TreeValues>... predicateList); @Override boolean test(TreeValues possibleValues);  }
@Test public void test() { assertThat(new TypePredicateList().test(null)).isFalse(); assertThat(new TypePredicateList(x -> true).test(null)).isTrue(); assertThat(new TypePredicateList(x -> true, x -> false).test(null)).isTrue(); assertThat(new TypePredicateList(x -> false, x -> true).test(null)).isTrue(); assertThat(new TypePredicateList(x -> false, x -> false).test(null)).isFalse(); }