亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ordereddictionary.cs

?? C#寫的類似于STL的集合類,首先是C#編寫,可以用于.net變程.
?? CS
?? 第 1 頁 / 共 3 頁
字號:
			{
                KeyValuePair<TKey, TValue> dummy;
                tree.Insert(NewPair(key, value),
                                DuplicatePolicy.ReplaceLast, out dummy);
			}
		}

		/// <summary>
		/// Determines if this dictionary contains a key equal to <paramref name="key"/>. The dictionary
		/// is not changed.
		/// </summary>
        /// <remarks>Searching the dictionary for a key takes time O(log N), where N is the number of keys in the dictionary.</remarks>
        /// <param name="key">The key to search for.</param>
        /// <returns>True if the dictionary contains key. False if the dictionary does not contain key.</returns>
        public sealed override bool ContainsKey(TKey key)
        {
            KeyValuePair<TKey, TValue> pairFound;

            return tree.Find(NewPair(key), false, false, out pairFound);
		}

        /// <summary>
        /// Determines if this dictionary contains a key equal to <paramref name="key"/>. If so, the value
        /// associated with that key is returned through the value parameter.
        /// </summary>
        /// <remarks>TryGetValue takes time O(log N), where N is the number of entries in the dictionary.</remarks>
        /// <param name="key">The key to search for.</param>
        /// <param name="value">Returns the value associated with key, if true was returned.</param>
        /// <returns>True if the dictionary contains key. False if the dictionary does not contain key.</returns>
        public sealed override bool TryGetValue(TKey key, out TValue value)
        {
            KeyValuePair<TKey, TValue> pairFound;

            bool found = tree.Find(NewPair(key), false, false, out pairFound);
            value = pairFound.Value;
            return found;
        }

        #endregion

		#region ICollection<KeyValuePair<TKey,TValue>> Members

        /// <summary>
        /// Returns the number of keys in the dictionary.
		/// </summary>
        /// <remarks>The size of the dictionary is returned in constant time..</remarks>
        /// <value>The number of keys in the dictionary.</value>
        public sealed override int Count
		{
			get
			{
				return tree.ElementCount;
			}
		}

#endregion

		#region IEnumerable<KeyValuePair<TKey,TValue>> Members

		/// <summary>
		/// Returns an enumerator that enumerates all the entries in the dictionary. Each entry is 
		/// returned as a KeyValuePair&lt;TKey,TValue&gt;.
		/// The entries are enumerated in the sorted order of the keys.
		/// </summary>
		/// <remarks>
		/// <p>Typically, this method is not called directly. Instead the "foreach" statement is used
		/// to enumerate the elements of the dictionary, which uses this method implicitly.</p>
		/// <p>If an element is added to or deleted from the dictionary while it is being enumerated, then 
		/// the enumeration will end with an InvalidOperationException.</p>
		/// <p>Enumeration all the entries in the dictionary takes time O(N log N), where N is the number
		/// of entries in the dictionary.</p>
		/// </remarks>
		/// <returns>An enumerator for enumerating all the elements in the OrderedDictionary.</returns>		
		public sealed override IEnumerator<KeyValuePair<TKey,TValue>> GetEnumerator()
		{
            return tree.GetEnumerator();
		}

		#endregion

		#region ICloneable Members

		/// <summary>
		/// Implements ICloneable.Clone. Makes a shallow clone of this dictionary; i.e., if keys or values are reference types, then they are not cloned.
		/// </summary>
		/// <returns>The cloned dictionary.</returns>
		object ICloneable.Clone()
		{
            return Clone();	
		}

		#endregion

        /// <summary>
        /// The OrderedDictionary&lt;TKey,TValue&gt;.View class is used to look at a subset of the keys and values
        /// inside an ordered dictionary. It is returned from the Range, RangeTo, RangeFrom, and Reversed methods. 
        /// </summary>
        ///<remarks>
        /// <p>Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made
        /// to the view, the underlying dictionary changes accordingly.</p>
        ///<p>Typically, this class is used in conjunction with a foreach statement to enumerate the keys
        /// and values in a subset of the OrderedDictionary. For example:</p>
        ///<code>
        /// foreach(KeyValuePair&lt;TKey, TValue&gt; pair in dictionary.Range(from, to)) {
        ///    // process pair
        /// }
        ///</code>
        ///</remarks>
        [Serializable]
        public class View : DictionaryBase<TKey, TValue>
        {
            private OrderedDictionary<TKey,TValue> myDictionary;
            private RedBlackTree<KeyValuePair<TKey,TValue>>.RangeTester rangeTester;   // range tester for the range being used.
            private bool entireTree;                   // is the view the whole tree?
            private bool reversed;                     // is the view reversed?

            /// <summary>
            /// Initialize the View.
            /// </summary>
            /// <param name="myDictionary">Associated OrderedDictionary to be viewed.</param>
            /// <param name="rangeTester">Range tester that defines the range being used.</param>
            /// <param name="entireTree">If true, then rangeTester defines the entire tree.</param>
            /// <param name="reversed">Is the view enuemerated in reverse order?</param>
            internal View(OrderedDictionary<TKey, TValue> myDictionary, RedBlackTree<KeyValuePair<TKey, TValue>>.RangeTester rangeTester, bool entireTree, bool reversed)
            {
                this.myDictionary = myDictionary;
                this.rangeTester = rangeTester;
                this.entireTree = entireTree;
                this.reversed = reversed;
            }

            /// <summary>
            /// Determine if the given key lies within the bounds of this view.
            /// </summary>
            /// <param name="key">Key to test.</param>
            /// <returns>True if the key is within the bounds of this view.</returns>
            private bool KeyInView(TKey key)
            {
                return rangeTester(NewPair(key, default(TValue))) == 0;
            }

            /// <summary>
            /// Enumerate all the keys and values in this view.
            /// </summary>
            /// <returns>An IEnumerator of KeyValuePairs with the keys and views in this view.</returns>
            public sealed override IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
            {
                if (reversed)
                    return myDictionary.tree.EnumerateRangeReversed(rangeTester).GetEnumerator();
                else
                    return myDictionary.tree.EnumerateRange(rangeTester).GetEnumerator();
            }

            /// <summary>
            /// Number of keys in this view.
            /// </summary>
            /// <value>Number of keys that lie within the bounds the view.</value>
            public sealed override int Count
            {
                get
                {
                    if (entireTree)
                        return myDictionary.Count;
                    else
                        return myDictionary.tree.CountRange(rangeTester);
                }
            }

            /// <summary>
            /// Tests if the key is present in the part of the dictionary being viewed.
            /// </summary>
            /// <param name="key">Key to check for.</param>
            /// <returns>True if the key is within this view. </returns>
            public sealed override bool ContainsKey(TKey key)
            {
                if (!KeyInView(key))
                    return false;
                else
                    return myDictionary.ContainsKey(key);
            }

            /// <summary>
            /// Determines if this view contains a key equal to <paramref name="key"/>. If so, the value
            /// associated with that key is returned through the value parameter. 
            /// </summary>
            /// <param name="key">The key to search for.</param>
            /// <param name="value">Returns the value associated with key, if true was returned.</param>
            /// <returns>True if the key is within this view. </returns>
            public sealed override bool TryGetValue(TKey key, out TValue value)
            {
                if (!KeyInView(key)) {
                    value = default(TValue);
                    return false;
                }
                else {
                    return myDictionary.TryGetValue(key, out value);
                }
            }

            /// <summary>
            /// Gets or sets the value associated with a given key. When getting a value, if this
            /// key is not found in the collection, then an ArgumentException is thrown. When setting
            /// a value, the value replaces any existing value in the dictionary. When setting a value, the 
            /// key must be within the range of keys being viewed.
            /// </summary>
            /// <value>The value associated with the key.</value>
            /// <exception cref="ArgumentException">A value is being retrieved, and the key is not present in the dictionary, 
            /// or a value is being set, and the key is outside the range of keys being viewed by this View.</exception>
            public sealed override TValue this[TKey key]
            {
                get       // technically we don't need to override this, but fixes a bug in NDOC.
                {
                    return base[key];
                }
                 set
                {
                    if (!KeyInView(key))
                        throw new ArgumentException(Strings.OutOfViewRange, "key");
                    else
                        myDictionary[key] = value;
                }
            }

            /// <summary>
            /// Removes the key (and associated value) from the underlying dictionary of this view. that is equal to the passed in key. If
            /// no key in the view is equal to the passed key, the dictionary and view are unchanged.
            /// </summary>
            /// <param name="key">The key to remove.</param>
            /// <returns>True if the key was found and removed. False if the key was not found.</returns>
            public sealed override bool Remove(TKey key)
            {
                if (!KeyInView(key))
                    return false;
                else
                    return myDictionary.Remove(key);
            }

            /// <summary>
            /// Removes all the keys and values within this view from the underlying OrderedDictionary.
            /// </summary>
            /// <example>The following removes all the keys that start with "A" from an OrderedDictionary.
            /// <code>
            /// dictionary.Range("A", "B").Clear();
            /// </code>
            /// </example>
            public sealed override void Clear()
            {
                if (entireTree) {
                    myDictionary.Clear();
                }
                else {
                    myDictionary.tree.DeleteRange(rangeTester);
                }
            }

            /// <summary>
            /// Creates a new View that has the same keys and values as this, in the reversed order.
            /// </summary>
            /// <returns>A new View that has the reversed order of this view.</returns>
            public View Reversed()
            {
                return new View(myDictionary, rangeTester, entireTree, !reversed);
            }
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久精品免费观看| 91麻豆精品国产综合久久久久久| 亚洲综合色自拍一区| 日韩三级在线免费观看| 成人avav影音| 日本不卡在线视频| 一区二区三区在线视频观看58| 精品国内二区三区| 欧美日韩免费一区二区三区视频| 国产一区视频导航| 蜜桃久久久久久| 亚洲成人免费观看| 国产成人免费视频精品含羞草妖精| 亚洲综合男人的天堂| 国产欧美中文在线| 欧美mv和日韩mv的网站| 欧美色手机在线观看| 东方aⅴ免费观看久久av| 青青草视频一区| 午夜精品久久久久久久| 亚洲欧美电影院| 日韩毛片视频在线看| 久久精品亚洲乱码伦伦中文| 精品国产免费人成在线观看| 欧美日韩精品一区二区在线播放| 色老汉av一区二区三区| www.亚洲国产| a级精品国产片在线观看| 国产精品亚洲一区二区三区妖精 | 夜色激情一区二区| 亚洲欧美经典视频| 日韩美女视频一区二区| 国产精品欧美一区二区三区| 欧美激情一区三区| 中文一区在线播放| 国产精品成人在线观看| 亚洲欧洲另类国产综合| 中文字幕av一区二区三区免费看 | 亚洲视频一二区| 欧美国产亚洲另类动漫| 欧美国产97人人爽人人喊| 久久精品亚洲麻豆av一区二区 | 亚洲成av人片一区二区| 亚洲成人av一区二区三区| 亚洲一区二区三区四区在线免费观看| 亚洲色图视频网站| 亚洲精品免费视频| 亚洲一区二区三区四区不卡| 亚洲地区一二三色| 婷婷成人激情在线网| 琪琪一区二区三区| 九一九一国产精品| 粉嫩一区二区三区在线看| 97久久精品人人做人人爽| 一本一道久久a久久精品综合蜜臀| 色综合天天视频在线观看| 色老汉一区二区三区| 欧美三区在线视频| 日韩西西人体444www| 精品国产精品一区二区夜夜嗨| 久久精品视频免费| 亚洲人成影院在线观看| 99国产欧美另类久久久精品 | 欧美精品在线观看播放| 欧美一级二级三级乱码| xvideos.蜜桃一区二区| 亚洲欧洲韩国日本视频| 首页综合国产亚洲丝袜| 国产精品一级黄| 在线精品视频免费观看| 91精品国产综合久久精品图片| www日韩大片| 亚洲免费av高清| 免费观看日韩av| 成人免费电影视频| 欧美日韩中文国产| 久久久久久黄色| 亚洲一区二区三区四区在线观看| 美国三级日本三级久久99 | 欧美一区二区三区视频| 欧美激情在线一区二区三区| 亚洲电影一区二区| 国产一区视频导航| 欧美日韩亚洲另类| 中文字幕欧美日韩一区| 视频一区视频二区中文字幕| 国产成人一级电影| 欧美久久久久免费| 国产精品网站在线观看| 视频一区欧美精品| 成人久久久精品乱码一区二区三区| 欧美三级视频在线播放| 国产欧美日本一区视频| 日韩激情一二三区| 色国产综合视频| 久久精品人人做人人综合| 同产精品九九九| 99热国产精品| 26uuu色噜噜精品一区| 性久久久久久久| 91伊人久久大香线蕉| 精品国产乱码久久| 欧美午夜不卡在线观看免费| 欧美激情综合网| 久草精品在线观看| 91麻豆精品国产自产在线| 最新日韩av在线| 国产一区二区三区四区五区美女| 欧美人牲a欧美精品| 亚洲精品成人少妇| 懂色av噜噜一区二区三区av| 精品国产电影一区二区| 日韩专区欧美专区| 欧美视频中文一区二区三区在线观看| 国产精品福利在线播放| 国产一区二区三区综合| 欧美一区二区黄| 日韩精品免费专区| 欧美色综合久久| 亚洲在线观看免费| 日本精品一区二区三区高清 | 亚洲国产高清不卡| 激情图区综合网| 日韩一区二区电影在线| 午夜电影网一区| 欧美日韩国产在线播放网站| 亚洲一级电影视频| 在线观看视频91| 亚洲综合免费观看高清在线观看| 91浏览器打开| 亚洲人午夜精品天堂一二香蕉| 本田岬高潮一区二区三区| 久久久综合激的五月天| 国产综合久久久久久久久久久久| 日韩视频免费观看高清完整版在线观看| 亚洲 欧美综合在线网络| 欧美三区在线观看| 日韩在线播放一区二区| 3atv一区二区三区| 九一九一国产精品| 久久久欧美精品sm网站| 国产成人亚洲精品青草天美| 久久综合色鬼综合色| 国产自产高清不卡| 国产日韩欧美a| 91视频com| 亚洲高清在线精品| 日韩一区二区三区在线视频| 精品一区二区精品| 奇米精品一区二区三区在线观看一| 欧美一级爆毛片| 国产一区在线观看视频| 亚洲国产高清在线观看视频| 91婷婷韩国欧美一区二区| 亚洲美女免费在线| 欧美美女一区二区三区| 美国毛片一区二区三区| 国产日韩欧美激情| 在线亚洲+欧美+日本专区| 亚洲国产乱码最新视频 | 国产乱理伦片在线观看夜一区| 欧美激情一区三区| 欧美少妇一区二区| 九九视频精品免费| 欧美国产一区在线| 欧美日韩中字一区| 国产在线视频一区二区三区| 亚洲欧美国产三级| 日韩美女主播在线视频一区二区三区| 国产精品综合网| 亚洲一区二区高清| 久久人人爽爽爽人久久久| 一本色道久久综合亚洲精品按摩| 午夜精品福利在线| 国产日韩高清在线| 欧美人体做爰大胆视频| 国产69精品久久99不卡| 亚洲国产视频在线| 国产欧美一区二区三区在线看蜜臀| 色吧成人激情小说| 国精产品一区一区三区mba桃花 | 狠狠色综合色综合网络| 国产精品国产三级国产普通话蜜臀 | 精品一区二区三区免费播放 | 国产一区二区视频在线播放| 亚洲欧美在线视频| 精品国产乱码久久久久久蜜臀| 91丨九色porny丨蝌蚪| 久久国产精品99精品国产| 亚洲日韩欧美一区二区在线| 日韩免费一区二区| 日本道色综合久久| 国产成人日日夜夜| 日本不卡不码高清免费观看| 亚洲欧美国产77777| 精品奇米国产一区二区三区| 在线观看av不卡| 成人三级伦理片| 久久国产乱子精品免费女| 亚洲综合色区另类av|