예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public CircleList <T> Clone()
        {
            CircleList <T>       result = new CircleList <T>();
            CircleListEnumerator iter   = new CircleListEnumerator(this);

            while (iter.MoveNext())
            {
                result.AddLast(iter.curNode.Clone());
            }
            if (this.isLinked)
            {
                result.LinkLastAndFirst();
            }
            return(result);
        }
예제 #2
0
 public CircleListEnumerator(CircleList <T> list)
 {
     this.first  = list.first;
     EnumeLength = list.length;
 }