PowerCollections学习笔记(2):继承和模式

继承

 

Abstract

CollectionBase<T>

Implement

Bag<T>

OrderedBag<T>

OrderedSet<T>

Feature

duplicated

ordered

ordered & non-duplicated

  

 

Abstract

ListBase<T>

Implement

Deque<T>

BigList<T>

Feature

optimized for  inserting at beginning

optimized for >100


Abstract

DictionaryBase<TKey, TValue>

Implement

OrderedDictionary<TKey, TValue> 

Feature

ordered

 

Abstract

MultiDictionaryBase<TKey, TValue>

Implement

MultiDictionary<TKey, TValue>

Feature

multiple values associated with one key

 

 

模式 

 

Pair<TFirst, TSecond>

as Type of

CollectionBase<T>

Triple<TFirst, TSecond, TThird>

DictionaryBase<TKey, TValue>

CollectionBase<T>

readonly

ReadOnlyCollectionBase<T>

ListBase<T>

ReadOnlyListBase<T>

DictionaryBase<TKey, TValue>

ReadOnlyDictionaryBase<TKey, TValue>

MultiDictionaryBase<TKey, TValue>

ReadOnlyMultiDictionaryBase<TKey, TValue>

OrderedSet<T>

subclass

OrderedSet<T>.View : CollectionBase<T>

OrderedBag<T>

OrderedBag<T>.View : CollectionBase<T>

OrderedDictionary<TKey, TValue>

OrderedDictionary<TKey, TValue>.View : DictionaryBase<TKey, TValue>

OrderedMultiDictionary<TKey, TValue>

OrderedMultiDictionary<TKey, TValue>.View : MultiDictionaryBase<TKey, TValue>

 

posted @ 2011-10-20 11:26 华志昊 阅读(16) 评论(0) 编辑 收藏