public override AbstractEdgeMap <T> Put(int key, T value)
{
if (key >= minIndex && key <= maxIndex)
{
T existing = Interlocked.Exchange(ref arrayData[key - minIndex], value);
if (existing == null && value != null)
{
Interlocked.Increment(ref size);
}
else
{
if (existing != null && value == null)
{
Interlocked.Decrement(ref size);
}
}
}
return(this);
}