@staticmethod<EOL><INDENT>def _add_interval(all_intervals, new_interval):<DEDENT>
intervals = None<EOL>old_interval = None<EOL>for old_interval in all_intervals:<EOL><INDENT>intervals = Type2CondenseHelper._distinct(new_interval, old_interval)<EOL>if intervals:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if intervals is None:<EOL><INDENT>all_intervals.add(new_interval)<EOL><DEDENT>else:<EOL><INDENT>if old_interval:<EOL><INDENT>all_intervals.remove(old_interval)<EOL><DEDENT>for distinct_interval in intervals:<EOL><INDENT>Type2CondenseHelper._add_interval(all_intervals, distinct_interval)<EOL><DEDENT><DEDENT>
Adds a new interval to a set of none overlapping intervals.

:param set[(int,int)] all_intervals: The set of distinct intervals.
:param (int,int) new_interval: The new interval.