X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2Ffeatures%2FFeatureStore.java;h=51bee5795610ed2baf38aeca24cdd27286e82761;hb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;hp=b082b567471a1a6d55188ac84d9f49a8574e9d63;hpb=163ed5b997bbda48e4cdd950e87a8fe01baae7fb;p=jalview.git diff --git a/src/jalview/datamodel/features/FeatureStore.java b/src/jalview/datamodel/features/FeatureStore.java index b082b56..51bee57 100644 --- a/src/jalview/datamodel/features/FeatureStore.java +++ b/src/jalview/datamodel/features/FeatureStore.java @@ -54,7 +54,7 @@ public class FeatureStore /** * serves a search condition for finding the first feature whose end - * position follows a given target location + * position is at or follows a given target location * * @param target * @return @@ -596,28 +596,15 @@ public class FeatureStore protected void findNonNestedFeatures(long from, long to, List result) { + /* + * find the first feature whose end position is + * after the target range start + */ int startIndex = binarySearch(nonNestedFeatures, SearchCriterion.byEnd(from)); - findNonNestedFeatures(startIndex, from, to, result); - } - - /** - * Scans the list of non-nested features, starting from startIndex, to find - * those that overlap the from-to range, and adds them to the result list. - * Returns the index of the first feature whose start position is after the - * target range (or the length of the whole list if no such feature exists). - * - * @param startIndex - * @param from - * @param to - * @param result - * @return - */ - protected int findNonNestedFeatures(final int startIndex, long from, - long to, List result) - { - int i = startIndex; + final int startIndex1 = startIndex; + int i = startIndex1; while (i < nonNestedFeatures.size()) { SequenceFeature sf = nonNestedFeatures.get(i); @@ -631,7 +618,6 @@ public class FeatureStore } i++; } - return i; } /**