Package com.google.common.collect
Class ImmutableRangeMap.Builder<K extends Comparable<?>,V>
java.lang.Object
com.google.common.collect.ImmutableRangeMap.Builder<K,V>
- Enclosing class:
ImmutableRangeMap<K extends Comparable<?>,
V>
A builder for immutable range maps. Overlapping ranges are prohibited.
- Since:
- 14.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns anImmutableRangeMap
containing the associations previously added to this builder.(package private) ImmutableRangeMap.Builder
<K, V> combine
(ImmutableRangeMap.Builder<K, V> builder) Associates the specified range with the specified value.Copies all associations from the specified range map into this builder.
-
Field Details
-
entries
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
put
Associates the specified range with the specified value.- Throws:
IllegalArgumentException
- ifrange
is empty
-
putAll
Copies all associations from the specified range map into this builder. -
combine
-
build
Returns anImmutableRangeMap
containing the associations previously added to this builder.- Throws:
IllegalArgumentException
- if any two ranges inserted into this builder overlap
-