JAL-2808 classes to support filtering by attribute value
[jalview.git] / src / jalview / util / matcher / KeyedMatcherI.java
diff --git a/src/jalview/util/matcher/KeyedMatcherI.java b/src/jalview/util/matcher/KeyedMatcherI.java
new file mode 100644 (file)
index 0000000..a746cd9
--- /dev/null
@@ -0,0 +1,32 @@
+package jalview.util.matcher;
+
+import java.util.function.Function;
+
+public interface KeyedMatcherI
+{
+  boolean matches(Function<String, String> valueProvider);
+
+  /**
+   * Answers a new object that matches the logical AND of this and m
+   * 
+   * @param m
+   * @return
+   */
+  KeyedMatcherI and(String key, MatcherI m);
+
+  /**
+   * Answers a new object that matches the logical OR of this and m
+   * 
+   * @param m
+   * @return
+   */
+  KeyedMatcherI or(String key, MatcherI m);
+
+  String getKey();
+
+  MatcherI getMatcher();
+
+  KeyedMatcherI getSecondMatcher();
+
+  boolean isAnded();
+}