import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.List;
/**
*/
private List<NCNode<T>> subranges;
- /*
- * a comparator to sort intervals by start position ascending, with
- * longer (enclosing) intervals preceding those they enclose
- */
- Comparator<ContiguousI> intervalSorter = new RangeComparator(true);
-
/**
* Constructor given a list of things that are each located on a contiguous
* interval. Note that the constructor may reorder the list.
* sort by start ascending so that contained intervals
* follow their containing interval
*/
- Collections.sort(ranges, intervalSorter);
+ Collections.sort(ranges, RangeComparator.BY_START_POSITION);
List<Range> sublists = buildSubranges(ranges);
if (subRegions != null)
{
subranges.addAll(subRegions.subranges);
- Collections.sort(subranges, intervalSorter);
+ Collections.sort(subranges, RangeComparator.BY_START_POSITION);
}
size--;
return true;