public static class ImmutableRangeSet.Builder<C extends Comparable<?>> extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ImmutableRangeSet.Builder<C> |
add(Range<C> range)
Add the specified range to this builder.
|
ImmutableRangeSet.Builder<C> |
addAll(Iterable<Range<C>> ranges)
Add all of the specified ranges to this builder.
|
ImmutableRangeSet.Builder<C> |
addAll(RangeSet<C> ranges)
Add all ranges from the specified range set to this builder.
|
ImmutableRangeSet<C> |
build()
Returns an
ImmutableRangeSet containing the ranges added to this builder. |
public Builder()
@CanIgnoreReturnValue public ImmutableRangeSet.Builder<C> add(Range<C> range)
build()
is called.IllegalArgumentException
- if range
is empty@CanIgnoreReturnValue public ImmutableRangeSet.Builder<C> addAll(RangeSet<C> ranges)
build()
is
called.@CanIgnoreReturnValue public ImmutableRangeSet.Builder<C> addAll(Iterable<Range<C>> ranges)
build()
is called.IllegalArgumentException
- if any inserted ranges are emptypublic ImmutableRangeSet<C> build()
ImmutableRangeSet
containing the ranges added to this builder.IllegalArgumentException
- if any input ranges have nonempty overlapCopyright © 2010–2017. All rights reserved.