Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public CircleListEnumerator(CircleList <T> list)
 {
     this.first  = list.first;
     EnumeLength = list.length;
 }