X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSearchResultMatchI.java;h=dedb960ebf5c4b955a2fd2df1256c37f1d4bd846;hb=2989fded65d7eb892018bcf783425fe23bc679d9;hp=732f1dc0fe00cf02a4bf728be75a699865bcf604;hpb=1145ab823ba8ffd317754588efeb259d70c1f4a1;p=jalview.git diff --git a/src/jalview/datamodel/SearchResultMatchI.java b/src/jalview/datamodel/SearchResultMatchI.java index 732f1dc..dedb960 100644 --- a/src/jalview/datamodel/SearchResultMatchI.java +++ b/src/jalview/datamodel/SearchResultMatchI.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; /** @@ -27,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