1 package jalview.util.matcher;
3 import java.util.function.Function;
6 * An interface to describe a set of one or more key-value match conditions,
7 * where all conditions are combined with either AND or OR
12 public interface KeyedMatcherSetI
15 * Answers true if the value provided for this matcher's key passes this
16 * matcher's match condition
18 * @param valueProvider
21 boolean matches(Function<String[], String> valueProvider);
24 * Answers a new object that matches the logical AND of this and m
28 * @throws IllegalStateException
29 * if an attempt is made to AND to existing OR-ed conditions
31 KeyedMatcherSetI and(KeyedMatcherI m);
34 * Answers true if any second condition is AND-ed with this one, false if it
42 * Answers a new object that matches the logical OR of this and m
46 * @throws IllegalStateException
47 * if an attempt is made to OR to existing AND-ed conditions
49 KeyedMatcherSetI or(KeyedMatcherI m);
52 * Answers an iterator over the combined match conditions
56 Iterable<KeyedMatcherI> getMatchers();
59 * Answers true if this object contains no conditions