X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Futil%2Fmatcher%2FKeyedMatcherI.java;h=e9fe014485dcb3d9f8723703725264f5b9146d53;hb=5db0fd7c7e90a1a9ad26c99673f77b43675d7647;hp=a746cd95d111acd7c58d5ca1a3641a0b01d15ac1;hpb=67dbd0072044a077ac43079ea12c8c4803636ee1;p=jalview.git diff --git a/src/jalview/util/matcher/KeyedMatcherI.java b/src/jalview/util/matcher/KeyedMatcherI.java index a746cd9..e9fe014 100644 --- a/src/jalview/util/matcher/KeyedMatcherI.java +++ b/src/jalview/util/matcher/KeyedMatcherI.java @@ -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 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 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(); }