Add a labeled interval (if not present) to this set, if it does not conflict with existing intervals.
Labeled intervals conflict if:
For example, if this set is { "A"=[0,10), "B"=[20,30) },
low end of the interval, inclusive
high end of the interval, exclusive, must be greater than start
label to add
an IntervalConflictError if label is already in this set and its interval is not [start,end), or if an interval in this set with a different label overlaps [start,end)
A mutable set of labeled intervals, where each unique label is associated with a non-overlapping half-open interval [start,end).
For example, { "A"=[0,10), "B"=[20,30) } is an interval set where the labels are strings "A" and "B". We could add "C"=[10,20) to such a set, but not "D"=[25,35) since that interval overlaps with "B"=[20,30).
Labels are of arbitrary type
Label
and are compared for equality using ===. They may not be null, undefined, or NaN*.* Note: this spec was corrected
PS2 instructions: this is a required ADT interface. You may not change the specifications or add new methods.