X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSearchResultsI.java;h=d682de1056306ca3387a2457b71a51fa92e7d728;hb=6ca8a32d88328b8f2162512f41c657c87e131045;hp=c89f3633648ad14efd14cb9ae5aeeeaf79f78463;hpb=3d2750d886f1b6015b2fc3f8671a6cf3e32bb07a;p=jalview.git diff --git a/src/jalview/datamodel/SearchResultsI.java b/src/jalview/datamodel/SearchResultsI.java index c89f363..d682de1 100644 --- a/src/jalview/datamodel/SearchResultsI.java +++ b/src/jalview/datamodel/SearchResultsI.java @@ -51,6 +51,19 @@ public interface SearchResultsI */ void addResult(SequenceI seq, int[] positions); + + /** + * Adds the given start/end region to this search result. If sequence already + * has a search result and the range is adjacent to already highlighted + * positions, they will be merged + * + * @param sequence + * @param start + * @param end + * @return true if an existing range was updated with this one + */ + boolean appendResult(SequenceI sequence, int start, int end); + /** * adds all match results in the argument to this set * @@ -118,4 +131,12 @@ public interface SearchResultsI * @return number of bits set */ int markColumns(SequenceCollectionI sqcol, BitSet bs); + + /** + * Return sub-sequences corresponding to distinct contiguous ranges in the + * matching set + * + * @return list of sequence objects + */ + List getMatchingSubSequences(); } \ No newline at end of file