1 package jalview.datamodel.features;
3 import jalview.datamodel.SequenceFeature;
6 * An interface to describe a set of one or more feature matchers, where all
7 * matchers are combined with either AND or OR
12 public interface FeatureMatcherSetI
15 * Answers true if the feature provided passes this matcher's match condition
20 boolean matches(SequenceFeature feature);
23 * Adds (ANDs) match condition m to this object's matcher set
26 * @throws IllegalStateException
27 * if an attempt is made to AND to existing OR-ed conditions
29 void and(FeatureMatcherI m);
32 * Answers true if any second condition is AND-ed with this one, false if it
40 * Adds (ORs) the given condition to this object's match conditions
43 * @throws IllegalStateException
44 * if an attempt is made to OR to existing AND-ed conditions
46 void or(FeatureMatcherI m);
49 * Answers an iterator over the combined match conditions
53 Iterable<FeatureMatcherI> getMatchers();
56 * Answers true if this object contains no conditions
63 * Answers a string representation of this object suitable for use when
64 * persisting data, in a format that can be reliably read back. Any changes to
65 * the format should be backwards compatible.
67 String toStableString();