X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSearchResultMatchI.java;h=dedb960ebf5c4b955a2fd2df1256c37f1d4bd846;hb=2989fded65d7eb892018bcf783425fe23bc679d9;hp=a47ca8bd4278f71d845bb362166312cecab45703;hpb=5776cb3b3d74f3c3d3d791d56287d8d78e46b01b;p=jalview.git diff --git a/src/jalview/datamodel/SearchResultMatchI.java b/src/jalview/datamodel/SearchResultMatchI.java index a47ca8b..dedb960 100644 --- a/src/jalview/datamodel/SearchResultMatchI.java +++ b/src/jalview/datamodel/SearchResultMatchI.java @@ -47,4 +47,23 @@ public interface SearchResultMatchI */ int getEnd(); + /** + * Answers true if this match is for the given sequence and includes (matches + * or encloses) the given start-end range + * + * @param seq + * @param start + * @param end + * @return + */ + boolean contains(SequenceI seq, int start, int end); + + /** + * + * @param seq + * @param from - first position to highlight + * @param to - last position to highlight (assumed higher than from) + * @return true iff from-to intersects or marks positions either side of start/end + */ + boolean adjacent(SequenceI seq, int from, int to); } \ No newline at end of file