Exemple #1
0
        public int CompareTo(SortedListIterator <T> rhs)
        {
            if (!object.ReferenceEquals(m_List, rhs.m_List))
            {
                throw new ArgumentException("Comparing iterators to different collections.");
            }

            return(m_Position.CompareTo(rhs.m_Position));
        }
Exemple #2
0
        public bool Equals(InputIterator <T> rhs)
        {
            SortedListIterator <T> listIterator = rhs as SortedListIterator <T>;

            if (listIterator == null)
            {
                return(false);
            }
            return(Equals(listIterator));
        }
Exemple #3
0
        public void Assign(InputIterator <T> iterator)
        {
            SortedListIterator <T> listIterator = iterator as SortedListIterator <T>;

            if (listIterator == null)
            {
                throw new ArgumentException("Iterator type mismatch.");
            }

            Assign(listIterator);
        }
Exemple #4
0
        public int CompareTo(RandomAccessIterator <T> rhs)
        {
            SortedListIterator <T> listIterator = rhs as SortedListIterator <T>;

            if (listIterator == null)
            {
                throw new ArgumentException("Iterator type mismatch.");
            }

            return(CompareTo(listIterator));
        }
Exemple #5
0
 public bool Equals(SortedListIterator <T> rhs)
 {
     return(object.ReferenceEquals(m_List, rhs.m_List) && (m_Position == rhs.m_Position));
 }
Exemple #6
0
 public void Assign(SortedListIterator <T> iterator)
 {
     m_List     = iterator.m_List;
     m_Position = iterator.m_Position;
 }