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
39 * sequence to highlight columns according to matches
41 * - first column of visible region
43 * - last column of visible region
44 * @return int[] ranges within start/end index on sequence
46 public abstract int[] getResults(SequenceI sequence, int start, int end);
48 public abstract int getSize();
50 public abstract SequenceI getResultSequence(int index);
53 * Returns the start position of the i'th match in the search results.
58 public abstract int getResultStart(int i);
61 * Returns the end position of the i'th match in the search results.
66 public abstract int getResultEnd(int i);
69 * Returns true if no search result matches are held.
73 public abstract boolean isEmpty();
76 * Returns the list of matches.
80 public abstract List<Match> getResults();