class AdjacentSortedRangeList extends SortedRangeList {

	@Override
    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){
				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) {
			set.add(new Range(min, max));
			return;
		}
		first.min = Math.min(first.min, min);
		first.max = Math.max(first.max, max);
		coalesce(first, it);
	}

	public  AdjacentSortedRangeList();
	public  AdjacentSortedRangeList(AdjacentSortedRangeList list);

}