07b060cfc53ae5911629f0c7d52329188ab41265
[jalview.git] / src / jalview / datamodel / features / FeatureMatcherI.java
1 package jalview.datamodel.features;
2
3 import jalview.datamodel.SequenceFeature;
4 import jalview.util.matcher.MatcherI;
5
6 /**
7  * An interface for an object that can apply a match condition to a
8  * SequenceFeature object
9  * 
10  * @author gmcarstairs
11  */
12 public interface FeatureMatcherI
13 {
14   /**
15    * Answers true if the value provided for this matcher's key passes this
16    * matcher's match condition
17    * 
18    * @param feature
19    * @return
20    */
21   boolean matches(SequenceFeature feature);
22
23   /**
24    * Answers the attribute key this matcher operates on (or null if match is by
25    * Label or Score)
26    * 
27    * @return
28    */
29   String[] getAttribute();
30
31   /**
32    * Answers true if match is against feature label (description), else false
33    * 
34    * @return
35    */
36   boolean isByLabel();
37
38   /**
39    * Answers true if match is against feature score, else false
40    * 
41    * @return
42    */
43   boolean isByScore();
44
45   /**
46    * Answers the match condition that is applied
47    * 
48    * @return
49    */
50   MatcherI getMatcher();
51 }