IntervalSet.add

Add interval; i.e., add all integers from a to b to set. If b<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}.

  1. void add(int el)
  2. void add(int a, int b)
    class IntervalSet
    void
    add
    (
    int a
    ,
    int b
    )
  3. void add(Interval addition)

Meta