1 package jalview.util.matcher;
3 import java.util.Iterator;
4 import java.util.function.Function;
7 * An interface to describe a set of one or more key-value match conditions,
8 * where all conditions are combined with either AND or OR
13 public interface KeyedMatcherSetI
16 * Answers true if the value provided for this matcher's key passes this
17 * matcher's match condition
19 * @param valueProvider
22 boolean matches(Function<String, String> valueProvider);
25 * Answers a new object that matches the logical AND of this and m
29 * @throws IllegalStateException
30 * if an attempt is made to AND to existing OR-ed conditions
32 KeyedMatcherSetI and(KeyedMatcherI m);
35 * Answers true if any second condition is AND-ed with this one, false if it
43 * Answers a new object that matches the logical OR of this and m
47 * @throws IllegalStateException
48 * if an attempt is made to OR to existing AND-ed conditions
50 KeyedMatcherSetI or(KeyedMatcherI m);
53 * Answers an iterator over the combined match conditions
57 Iterator<KeyedMatcherI> getMatchers();
60 * Answers true if this object contains no conditions