private Range < K > coalescedRange ( Range < K > range , V value ) { Range < K > coalescedRange = range ; Entry < Cut < K > , RangeMapEntry < K , V > > lowerEntry = entriesByLowerBound . lowerEntry ( range . lowerBound ) ; coalescedRange = coalesce ( coalescedRange , value , lowerEntry ) ; Entry < Cut < K > , RangeMapEntry < K , V > > higherEntry = entriesByLowerBound . floorEntry ( range . upperBound ) ; coalescedRange = coalesce ( coalescedRange , value , higherEntry ) ; return coalescedRange ; }
Computes the coalesced range for the given range + value - does not mutate the map .