public void Add(IntervalValuePair <TBound, TValue> item) { if (intervalValuePairs.Any(pair => pair.Interval.Intersects(item.Interval))) { throw new ArgumentException("An element with the same interval already exists."); } intervalValuePairs.Add(item); }
public bool Remove(IntervalValuePair <TBound, TValue> item) { throw new NotImplementedException(); }
public bool Contains(IntervalValuePair <TBound, TValue> item) { return(intervalValuePairs.Contains(item)); }