1 package jalview.datamodel;
3 import jalview.datamodel.SearchResults.Match;
7 public interface SearchResultsI
11 * This method replaces the old search results which merely held an alignment
12 * index of search matches. This broke when sequences were moved around the
22 public abstract void addResult(SequenceI seq, int start, int end);
25 * Quickly check if the given sequence is referred to in the search results
28 * (specific alignment sequence or a dataset sequence)
29 * @return true if the results involve sequence
31 public abstract boolean involvesSequence(SequenceI sequence);
34 * This Method returns the search matches which lie between the start and end
35 * points of the sequence in question. It is optimised for returning objects
36 * for drawing on SequenceCanvas
38 public abstract int[] getResults(SequenceI sequence, int start, int end);
40 public abstract int getSize();
42 public abstract SequenceI getResultSequence(int index);
45 * Returns the start position of the i'th match in the search results.
50 public abstract int getResultStart(int i);
53 * Returns the end position of the i'th match in the search results.
58 public abstract int getResultEnd(int i);
61 * Returns true if no search result matches are held.
65 public abstract boolean isEmpty();
68 * Returns the list of matches.
72 public abstract List<Match> getResults();