/// <summary> /// Updates this object as specified by the given parameters /// </summary> /// <param name="newValue"></param> /// <param name="updateMode"></param> public void Update(BPlusListInt newValue, GrinGlobal.Interface.UpdateMode updateMode) { switch (updateMode) { case GrinGlobal.Interface.UpdateMode.Add: _value.AddRange(newValue.Value); break; case GrinGlobal.Interface.UpdateMode.Subtract: foreach (int val in newValue.Value) { if (_value.Contains(val)) { _value.Remove(val); } } break; case GrinGlobal.Interface.UpdateMode.Replace: _value = newValue.Value; break; default: throw new NotImplementedException(); } }
public void Update(BPlusInt newValue, GrinGlobal.Interface.UpdateMode updateMode) { switch (updateMode) { case GrinGlobal.Interface.UpdateMode.Add: _value += newValue.Value; break; case GrinGlobal.Interface.UpdateMode.Subtract: _value -= newValue.Value; break; case GrinGlobal.Interface.UpdateMode.Replace: _value = newValue.Value; break; default: throw new NotImplementedException(); } }