protected boolean inBounds(V val) {
		if (hasFrom) {
			int fromCmp = comparator.compare(val, fromValue);
			if (fromCmp < 0 || fromCmp == 0 && !fromInclusive) {
				return false;
			}
		}
		if (hasTo) {
			int toCmp = comparator.compare(val, toValue);
			if (toCmp > 0 || toCmp == 0 && !toInclusive) {
				return false;
			}
		}
		return true;
	}
Construct a restricted view of a value-sorted map

@param wrapped the value-sorted map to restrict
@param comparator the value comparator
@param hasFrom true if there exists a lower bound
@param fromValue the lower bound, if present
@param fromInclusive true to include the lower bound
@param hasTo true if there exists an upper bound
@param toValue the upper bound, if present
@param toInclusive true to include the upper bound
Ghidra/Framework/Generic/src/main/java/ghidra/generic/util/datastruct/RestrictedValueSortedMap.java