public virtual Antlr4.Runtime.Misc.IntervalSet AddAll(IIntSet set)
{
if (set == null)
{
return this;
}
if (set is Antlr4.Runtime.Misc.IntervalSet)
{
Antlr4.Runtime.Misc.IntervalSet other = (Antlr4.Runtime.Misc.IntervalSet)set;
// walk set and add each interval
int n = other.intervals.Count;
for (int i = 0; i < n; i++)
{
Interval I = other.intervals[i];
this.Add(I.a, I.b);
}
}
else
{
foreach (int value in set.ToList())
{
Add(value);
}
}
return this;
}