Home | History | Annotate | Download | only in collect

Lines Matching full:rangemap

33  * An immutable implementation of {@code RangeMap}, supporting all query operations efficiently.
35 * <p>Like all {@code RangeMap} implementations, this supports neither null keys nor null values.
42 public class ImmutableRangeMap<K extends Comparable<?>, V> implements RangeMap<K, V> {
66 RangeMap<K, ? extends V> rangeMap) {
67 if (rangeMap instanceof ImmutableRangeMap) {
68 return (ImmutableRangeMap<K, V>) rangeMap;
70 Map<Range<K>, ? extends V> map = rangeMap.asMapOfRanges();
92 private final RangeMap<K, V> rangeMap;
96 this.rangeMap = TreeRangeMap.create();
111 for (Entry<Range<K>, V> entry : rangeMap.asMapOfRanges().entrySet()) {
120 rangeMap.put(range, value);
127 * @throws IllegalArgumentException if any of the ranges in {@code rangeMap} overlap with ranges
130 public Builder<K, V> putAll(RangeMap<K, ? extends V> rangeMap) {
131 for (Entry<Range<K>, ? extends V> entry : rangeMap.asMapOfRanges().entrySet()) {
142 Map<Range<K>, V> map = rangeMap.asMapOfRanges();
204 public void putAll(RangeMap<K, V> rangeMap) {
288 if (o instanceof RangeMap) {
289 RangeMap<?, ?> rangeMap = (RangeMap<?, ?>) o;
290 return asMapOfRanges().equals(rangeMap.asMapOfRanges());