RangeMap based on a TreeMap, supporting all optional
operations.
Like all RangeMap implementations, this supports neither null keys nor null values.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final RangeMap | |
| private final NavigableMap |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Map | asDescendingMapOfRanges()
Implements com. Map<Range<K>, V>.
|
| public Map | asMapOfRanges()
Implements com. Map<Range<K>, V>.
|
| public void | clear()
Implements com. |
| private static <K extends Comparable | coalesce(Range<K> range, V value, Map.
Returns the range that spans the given range and entry, if the entry can be coalesced. |
| private Range | coalescedRange(Range<K> range, V value)
Computes the coalesced range for the given range+value - does not mutate the map. |
| public static <K extends Comparable | |
| private RangeMap | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Implements com. true if obj is another RangeMap that has an equivalent asMapOfRanges().
|
| public V | get(K key)
Implements com. null if there is no such value.
|
| public Map. | getEntry(K key)
Implements com. null otherwise.
|
| public int | hashCode()
Overrides java. Implements com. asMapOfRanges().hashCode().
|
| public void | merge(Range<K> range, V value, BiFunction<? super V, ? super @Nullable V, ? extends @Nullable V> remappingFunction)
Implements com. |
| public void | put(Range<K> range, V value)
Implements com. |
| public void | putAll(RangeMap<K, ? extends V> rangeMap)
Implements com. rangeMap into this range map (optional operation).
|
| public void | putCoalescing(Range<K> range, V value)
Implements com. |
| private void | |
| public void | remove(Range<K> rangeToRemove)
Implements com. |
| public Range | span()
Implements com. RangeMap.
|
| private void | |
| public RangeMap | subRangeMap(Range<K> subRange)
Implements com. range.
|
| public String | toString()
Overrides java. Implements com. |