コード例 #1
0
ファイル: CircularList.cs プロジェクト: waleedcs2000/Chapter3
 public void remove()
 {
     CNode old = m_cursor.Next;
     if (m_cursor == old)
         m_cursor = null;
     else
         m_cursor.Next = old.Next;
 }
コード例 #2
0
        public void remove()
        {
            CNode old = m_cursor.Next;

            if (m_cursor == old)
            {
                m_cursor = null;
            }
            else
            {
                m_cursor.Next = old.Next;
            }
        }
コード例 #3
0
ファイル: CircularList.cs プロジェクト: waleedcs2000/Chapter3
 public void add(string n)
 {
     CNode v = new CNode();
     v.Elem = n;
     if (isEmpty())
     {
         v.Next = v; //circul with only 1 item
         m_cursor = v;
     }
     else
     {
         v.Next = m_cursor.Next;
         m_cursor.Next = v;
     }
 }
コード例 #4
0
        public void add(string n)
        {
            CNode v = new CNode();

            v.Elem = n;
            if (isEmpty())
            {
                v.Next   = v; //circul with only 1 item
                m_cursor = v;
            }
            else
            {
                v.Next        = m_cursor.Next;
                m_cursor.Next = v;
            }
        }
コード例 #5
0
ファイル: CircularList.cs プロジェクト: waleedcs2000/Chapter3
 public void advance()
 {
     m_cursor = m_cursor.Next;
 }
コード例 #6
0
ファイル: CircularList.cs プロジェクト: waleedcs2000/Chapter3
 public CircularList()
 {
     m_cursor = null;
 }
コード例 #7
0
 public void advance()
 {
     m_cursor = m_cursor.Next;
 }
コード例 #8
0
 public CircularList()
 {
     m_cursor = null;
 }