From 3c6289e26f1060fd072f0eb8820cc206687b000f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 9 Aug 2017 10:28:58 +0100 Subject: [PATCH] JAL-2480 inline one method, improve comments --- src/jalview/datamodel/features/FeatureStore.java | 28 ++++++---------------- 1 file changed, 7 insertions(+), 21 deletions(-) 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; } /** -- 1.7.10.2