JAL- 2835 support filter on nested attribute keys
[jalview.git] / src / jalview / util / matcher / KeyedMatcherI.java
index a746cd9..e8d71c1 100644 (file)
@@ -2,31 +2,35 @@ package jalview.util.matcher;
 
 import java.util.function.Function;
 
+/**
+ * An interface for an object that can apply one or more match conditions, given
+ * a key-value provider. The match conditions are stored against key values, and
+ * applied to the value obtained by a key-value lookup.
+ * 
+ * @author gmcarstairs
+ */
 public interface KeyedMatcherI
 {
-  boolean matches(Function<String, String> valueProvider);
-
   /**
-   * Answers a new object that matches the logical AND of this and m
+   * Answers true if the value provided for this matcher's key passes this
+   * matcher's match condition
    * 
-   * @param m
+   * @param valueProvider
    * @return
    */
-  KeyedMatcherI and(String key, MatcherI m);
+  boolean matches(Function<String[], String> valueProvider);
 
   /**
-   * Answers a new object that matches the logical OR of this and m
+   * Answers the value key this matcher operates on
    * 
-   * @param m
    * @return
    */
-  KeyedMatcherI or(String key, MatcherI m);
-
-  String getKey();
+  String[] getKey();
 
+  /**
+   * Answers the match condition that is applied
+   * 
+   * @return
+   */
   MatcherI getMatcher();
-
-  KeyedMatcherI getSecondMatcher();
-
-  boolean isAnded();
 }