public static final class ImmutableRangeMap.Builder<K extends Comparable<?>,V> extends Object
Constructor and Description |
---|
ImmutableRangeMap.Builder() |
Modifier and Type | Method and Description |
---|---|
ImmutableRangeMap<K,V> |
build()
Returns an
ImmutableRangeMap containing 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.
|
public ImmutableRangeMap.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 emptypublic ImmutableRangeMap.Builder<K,V> putAll(RangeMap<K,? extends V> rangeMap)
IllegalArgumentException
- if any of the ranges in rangeMap
overlap with ranges
already in this builderpublic ImmutableRangeMap<K,V> build()
ImmutableRangeMap
containing the associations previously added to this
builder.Copyright © 2010-2014. All Rights Reserved.