예제 #1
0
 public NewSortedDictionaryIterator(NewSortedDictionary <AbstractTimeStampInfo <T> > data, AbstractValueConvertor <T> valueCovertor)
 {
     this.valueCovertor = valueCovertor;
     this.data          = data;
     dataRepresentation = DataRepresentation.DefaultDataRepresentation;
     Reset();
 }
예제 #2
0
        /// <summary>
        /// "Слитие воедино двоих словарей"
        /// будет применяться для вставки результатов работы генераторов
        /// </summary>
        /// <param name="data"></param>
        public void InsertData(NewSortedDictionary <TValue> data)
        {
            int startIndex = BinarySearchKey(data.keys[0]);
            int endIndex   = BinarySearchKey(data.keys[data.Count - 1]);

            keys.RemoveRange(startIndex, endIndex - startIndex + 1);
            values.RemoveRange(startIndex, endIndex - startIndex + 1);
            keys.InsertRange(startIndex, data.keys);
            values.InsertRange(startIndex, data.values);
        }
 public NewSortedDictionaryEnumerator(NewSortedDictionary <TValue> dictionary)
 {
     this.dictionary = dictionary;
     key             = dictionary.Keys[0];
     value           = dictionary.Values[0];
 }