private void setCurrentRange(int index) {
		// optimized for sequential access, so first just check if the index is one more
		// than the current range of indexes, if so just move to the next range.
		if (index == currentRangeEnd + 1) {
			currentRangeIndex++;
			currentRange = ranges.get(currentRangeIndex);
		}
		// otherwise we must do a binary search to find the correct address range for the
		// given index.
		else {
			currentRangeIndex = Arrays.binarySearch(indexes, index);
			if (currentRangeIndex < 0) {
				currentRangeIndex = -currentRangeIndex - 2;
			}
		}
		// ok, found the current range, set the range index variables so that accesses in
		// this range will be fast.
		currentRange = ranges.get(currentRangeIndex);
		currentRangeStart = indexes[currentRangeIndex];
		currentRangeEnd = currentRangeStart + (int) currentRange.getLength() - 1;
	}
Sets the current range cache.  This class maintains the concept of a "current range",
which is a index into the range list and the start and end indexes for that range.
This way if the getAddress call uses an index into the "current range", it doesn't
have to do a binary search to find the range.
@param index
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressSetMapping.java