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>
 
 @DoNotMock public static final class ImmutableRangeMap.Builder<K extends Comparable<?>,V> extends Object A builder for immutable range maps. Overlapping ranges are prohibited.- Since:
- 14.0
 
- 
- 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableRangeMap<K,V>build()Returns anImmutableRangeMapcontaining the associations previously added to this builder.ImmutableRangeMap.Builder<K,V>put(Range<K> range, V value)Associates the specified range with the specified value.ImmutableRangeMap.Builder<K,V>putAll(RangeMap<K,? extends V> rangeMap)Copies all associations from the specified range map into this builder.
 
- 
- 
- 
Constructor Detail- 
Builderpublic Builder() 
 
- 
 - 
Method Detail- 
put@CanIgnoreReturnValue public ImmutableRangeMap.Builder<K,V> put(Range<K> range, V value) Associates the specified range with the specified value.- Throws:
- IllegalArgumentException- if- rangeis empty
 
 - 
putAll@CanIgnoreReturnValue public ImmutableRangeMap.Builder<K,V> putAll(RangeMap<K,? extends V> rangeMap) Copies all associations from the specified range map into this builder.
 - 
buildpublic ImmutableRangeMap<K,V> build() Returns anImmutableRangeMapcontaining the associations previously added to this builder.- Throws:
- IllegalArgumentException- if any two ranges inserted into this builder overlap
 
 
- 
 
-