public static final class ImmutableRangeMap.Builder<K extends java.lang.Comparable<?>,V>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.util.Map.Entry<Range<K>,V>> |
entries |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ImmutableRangeMap<K,V> |
build()
Returns an
ImmutableRangeMap containing the associations previously added to this
builder. |
(package private) ImmutableRangeMap.Builder<K,V> |
combine(ImmutableRangeMap.Builder<K,V> 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.
|
public ImmutableRangeMap.Builder<K,V> put(Range<K> range, V value)
java.lang.IllegalArgumentException
- if range
is emptypublic ImmutableRangeMap.Builder<K,V> putAll(RangeMap<K,? extends V> rangeMap)
ImmutableRangeMap.Builder<K,V> combine(ImmutableRangeMap.Builder<K,V> builder)
public ImmutableRangeMap<K,V> build()
ImmutableRangeMap
containing the associations previously added to this
builder.java.lang.IllegalArgumentException
- if any two ranges inserted into this builder overlap