public int getRangeIndex(int value) {
		Range key = new Range(value, value);
		SortedSet<Range> head = set.headSet(key);
		int index = head.size() - 1;
		if (!head.isEmpty()) {
			Range last = head.last();
			if (last.max >= value) {
				return index;
			}
		}
		index++;
		SortedSet<Range> tail = set.tailSet(key);
		if (!tail.isEmpty()) {
			Range range = tail.first();
			if (range.min == value) {
				return index;
			}
		}
		return -index - 1;
	}
Gets the range index for the range containing the specified value.
@param value the value to look for.
@return the range index or a negative value if the range list doesn't contain the value.
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/SortedRangeList.java