* Copyright (C) 2012 The Guava Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
In contrast to
, no "coalescing" is done of
Range.isConnected(com.google.common.collect.Range) ranges, even if they are mapped to the same value.
For example, if
rangeMap had the entries
[1, 5] => "foo", (6, 8) => "bar", (10, \u2025) => "baz"
rangeMap.subRangeMap(Range.open(3, 12)) would return a range map
with the entries
(3, 5) => "foo", (6, 8) => "bar", (10, 12) => "baz".
The returned range map supports all optional operations that this range map supports,
The returned range map will throw an
on an attempt to
insert a range not enclosed by
RangeMapthat has an equivalent