class SortedRangeList implements Iterable<Range> {

	public boolean intersects(int min, int max) {
		Range key = new Range(min, min);
		SortedSet<Range> head = set.headSet(key);
		if (!head.isEmpty()) {
			Range last = head.last();
			if (last.max >= min) {
				return true;
			}
		}
		SortedSet<Range> tail = set.tailSet(key);
		if (!tail.isEmpty()) {
			Range next = tail.first();
			if (next.min <= max) {
				return true;
			}
		}
		return false;
	}

	public  SortedRangeList();
	public  SortedRangeList(SortedRangeList list);

}