/// <summary> /// Creates a new object that is a copy of the current instance. /// </summary> /// <returns> /// A new object that is a copy of this instance. /// </returns> public override object Clone() { return(new EndLinkedDawgNode <TKey, TValue>(Key, LeftChild == null? null: (IDawgNode <TKey, TValue>)LeftChild.Clone(), RightSibling == null? null: (IDawgNode <TKey, TValue>)RightSibling.Clone(), Value)); }
/// <summary> /// Creates a new object that is a copy of the current instance. /// </summary> /// <returns> /// A new object that is a copy of this instance. /// </returns> public virtual object Clone() { return(new InnerDawgNode <TKey, TValue>() { Key = Key, LeftChild = LeftChild == null ? null : (IDawgNode <TKey, TValue>)LeftChild.Clone(), RightSibling = RightSibling == null ? null : (IDawgNode <TKey, TValue>)RightSibling.Clone(), }); }