Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 543 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 543 Bytes

kotlin-ranges-union

Kotlin ranges union library

Overview

This library provides IntRangeUnion and LongRangeUnion classes, which represent a mutable set of closed ranges of corresponding type.

Example:

val set = IntRangeUnion()
set.union(0..10)    \\ {[0, 10]}
set.union(20..30)   \\ {[0, 30]}
set.exclude(15..17) \\ {[0, 14], [18, 30]}

Install

Using gradle:

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    implementation "com.github.Recognized:kotlin-ranges-union:v1.01"
}