return new ImmutableRangeSet.Builder<C>().addAll(ranges).build();
/** * Add all ranges from the specified range set to this builder. Adjacent ranges are permitted * and will be merged, but overlapping ranges will cause an exception when {@link #build()} is * called. */ @CanIgnoreReturnValue public Builder<C> addAll(RangeSet<C> ranges) { return addAll(ranges.asRanges()); }
/** * Returns an {@code ImmutableRangeSet} containing each of the specified disjoint ranges. * Overlapping ranges and empty ranges are forbidden, though adjacent ranges are permitted and * will be merged. * * @throws IllegalArgumentException if any ranges overlap or are empty * @since 21.0 */ public static <C extends Comparable<?>> ImmutableRangeSet<C> copyOf(Iterable<Range<C>> ranges) { return new ImmutableRangeSet.Builder<C>().addAll(ranges).build(); }
/** * Returns an {@code ImmutableRangeSet} containing each of the specified disjoint ranges. * Overlapping ranges and empty ranges are forbidden, though adjacent ranges are permitted and * will be merged. * * @throws IllegalArgumentException if any ranges overlap or are empty * @since 21.0 */ public static <C extends Comparable<?>> ImmutableRangeSet<C> copyOf(Iterable<Range<C>> ranges) { return new ImmutableRangeSet.Builder<C>().addAll(ranges).build(); }
@CanIgnoreReturnValue Builder<C> combine(Builder<C> builder) { addAll(builder.ranges); return this; }
/** * Add all ranges from the specified range set to this builder. Adjacent ranges are permitted * and will be merged, but overlapping ranges will cause an exception when {@link #build()} is * called. */ @CanIgnoreReturnValue public Builder<C> addAll(RangeSet<C> ranges) { return addAll(ranges.asRanges()); }
@CanIgnoreReturnValue Builder<C> combine(Builder<C> builder) { addAll(builder.ranges); return this; }
@CanIgnoreReturnValue Builder<C> combine(Builder<C> builder) { addAll(builder.ranges); return this; }
/** * Add all ranges from the specified range set to this builder. Adjacent ranges are permitted * and will be merged, but overlapping ranges will cause an exception when {@link #build()} is * called. */ @CanIgnoreReturnValue public Builder<C> addAll(RangeSet<C> ranges) { return addAll(ranges.asRanges()); }
/** * Returns an {@code ImmutableRangeSet} containing each of the specified disjoint ranges. * Overlapping ranges and empty ranges are forbidden, though adjacent ranges are permitted and * will be merged. * * @throws IllegalArgumentException if any ranges overlap or are empty * @since 21.0 */ public static <C extends Comparable<?>> ImmutableRangeSet<C> copyOf(Iterable<Range<C>> ranges) { return new ImmutableRangeSet.Builder<C>().addAll(ranges).build(); }
@CanIgnoreReturnValue Builder<C> combine(Builder<C> builder) { addAll(builder.ranges); return this; }
/** * Add all ranges from the specified range set to this builder. Adjacent ranges are permitted * and will be merged, but overlapping ranges will cause an exception when {@link #build()} is * called. */ @CanIgnoreReturnValue public Builder<C> addAll(RangeSet<C> ranges) { return addAll(ranges.asRanges()); }
/** * Returns an {@code ImmutableRangeSet} containing each of the specified disjoint ranges. * Overlapping ranges and empty ranges are forbidden, though adjacent ranges are permitted and * will be merged. * * @throws IllegalArgumentException if any ranges overlap or are empty * @since 21.0 */ public static <C extends Comparable<?>> ImmutableRangeSet<C> copyOf(Iterable<Range<C>> ranges) { return new ImmutableRangeSet.Builder<C>().addAll(ranges).build(); }