/**
* 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
protected void findNonNestedFeatures(long from, long to,
List<SequenceFeature> 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<SequenceFeature> result)
- {
- int i = startIndex;
+ final int startIndex1 = startIndex;
+ int i = startIndex1;
while (i < nonNestedFeatures.size())
{
SequenceFeature sf = nonNestedFeatures.get(i);
}
i++;
}
- return i;
}
/**