This method of the IIntRangeComparator Interface determines if two overlapping ranges can be merged into a single range. This method is called by IntRanges.condense. If the ranges can be merged, they should be merged into the ranges and true should be returned.
boolean mergeRanges(IntRanges ranges, int i1, int i2);
Returns true if the ranges can be merged; otherwise, returns false.
ranges | The IntRanges object to merge to. |
i1 | The index of first range to merge. |
i2 | The index of second range to merge into the first range. |