open fun addAll(elements: Collection<ClosedRange<T>>): Boolean
(source)Adds ranges of values to the set; addition set logic.
Examples:
assert(IntRangeSet(listOf(5..21)).apply { addAll(listOf(7..10, 12..15)) }.toList() == listOf(5..21))
assert(IntRangeSet(listOf(5..8, 11..16)).apply { addAll(listOf(7..10, 14..20)) }.toList() == listOf(5..20))
assert(IntRangeSet(listOf(11..16)).apply { addAll(listOf(7..10, 18..21)) }.toList() == listOf(7..16, 18..21))
elements
- ranges of values to addReturn
whether any values were added