コード例 #1
0
 /// <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));
 }
コード例 #2
0
ファイル: InnerDawgNode.cs プロジェクト: bluelight1324/Eliza
 /// <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(),
     });
 }