//ToDO: Checked /// <summary> /// Tries to remove the key from the Node. /// </summary> /// <param name="key"></param> /// <returns></returns> public bool TryRemove(TKey key) { if (ValidBytes > m_minRecordNodeBytes && LowerKey.IsLessThanOrEqualTo(key) && key.IsLessThan(UpperKey)) { int index = GetIndexOf(key); if (index < 0) { return(false); } if (RemoveUnlessOverflow(index)) { return(true); } } return(TryRemove2(key)); }
/// <summary> /// Determines if the <see cref="key"/> resides within the bounds of the current node. /// </summary> /// <param name="key"></param> /// <returns></returns> public bool IsKeyInsideBounds(TKey key) { return((NodeIndex != uint.MaxValue) && (LeftSiblingNodeIndex == uint.MaxValue || LowerKey.IsLessThanOrEqualTo(key)) && (RightSiblingNodeIndex == uint.MaxValue || key.IsLessThan(UpperKey))); }