TimeIntervalCollectionTAdd Method (TimeIntervalT, IEqualityComparerT) |
Adds an interval to the interval collection. If the interval or a portion of the interval
already exists in the collection, the
Data from
item will replace the data already in the collection.
Namespace:
AGI.Foundation.Time
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax public void Add(
TimeInterval<T> item,
IEqualityComparer<T> dataComparer
)
Public Sub Add (
item As TimeInterval(Of T),
dataComparer As IEqualityComparer(Of T)
)
public:
void Add(
TimeInterval<T>^ item,
IEqualityComparer<T>^ dataComparer
)
member Add :
item : TimeInterval<'T> *
dataComparer : IEqualityComparer<'T> -> unit
Parameters
- item
- Type: AGI.Foundation.TimeTimeIntervalT
The interval to add. - dataComparer
- Type: System.Collections.GenericIEqualityComparerT
The object to use to compare the Data properties of intervals.
Exceptions Remarks dataComparer is used to compare the
Data properties of the intervals.
If
item overlaps any intervals already in the collection, the
Data property
from
item takes precedence and replaces the existing Data for the interval of overlap.
See Also