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();
+ /**
+ * Answers the match condition that is applied
+ *
+ * @return
+ */
MatcherI getMatcher();
-
- KeyedMatcherI getSecondMatcher();
-
- boolean isAnded();
}