public void add(int a, int b) {
        add(Interval.of(a, b));
    }
Add interval; i.e., add all integers from a to b to set.
 If b&lt;a, do nothing.
 Keep list in sorted order (by left range value).
 If overlap, combine ranges.  For example,
 If this is {1..5, 10..20}, adding 6..7 yields
 {1..5, 6..7, 10..20}.  Adding 4..8 yields {1..8, 10..20}.
runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java