public void addRange(int min, int max) {
		Range key = new Range(min, min);
		SortedSet<Range> headSet = set.headSet(key);
		if (!headSet.isEmpty()) {
			Range last = headSet.last();
			if (min <= last.max + 1) {
				last.max = Math.max(last.max, max);
				coalesce(last, set.tailSet(key).iterator());
				return;
			}
		}
		SortedSet<Range> ss = set.tailSet(key);
		if (ss.isEmpty()) {
			set.add(new Range(min, max));
			return;
		}
		Iterator<Range> it = ss.iterator();
		Range first = it.next();
		if (max < first.min - 1) {
			set.add(new Range(min, max));
			return;
		}
		first.min = Math.min(first.min, min);
		first.max = Math.max(first.max, max);
		coalesce(first, it);
	}
Adds the range from min to max to this sorted range list.  If the range is adjacent to or
overlaps any other existing ranges,  then those ranges will coalesce.
@param min the range minimum
@param max the range maximum (inclusive)
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/SortedRangeList.java