public static final class ImmutableRangeMap.Builder<K extends Comparable<?> extends Object,V>
| Constructor and Description |
|---|
Builder()
|
| Modifier and Type | Method and Description |
|---|---|
ImmutableRangeMap |
build()
Returns an
ImmutableRangeMap containing the associations previously added to this builder.
|
ImmutableRangeMap |
put(Range
Associates the specified range with the specified value.
|
ImmutableRangeMap |
putAll(RangeMap
Copies all associations from the specified range map into this builder.
|
public ImmutableRangeMap.Builder <K ,V> put(Range <K> range, V value)
IllegalArgumentException - if
range overlaps with any other ranges inserted into this builder, or if
range is empty
public ImmutableRangeMap.Builder <K ,V> putAll(RangeMap <K ,? extends V> rangeMap)
IllegalArgumentException - if any of the ranges in
rangeMap overlap with ranges already in this builder
public ImmutableRangeMap<K ,V> build()
ImmutableRangeMap containing the associations previously added to this builder.