X3Platform.Collections Namespace |
Class | Description | |
---|---|---|
![]() | Algorithms |
Algorithms contains a number of static methods that implement
algorithms that work on collections. Most of the methods deal with
the standard generic collection interfaces such as IEnumerable<T>,
ICollection<T> and IList<T>.
|
![]() | BagT |
Bag<T> is a collection that contains items of type T.
Unlike a Set, duplicate items (items that compare equal to each other) are allowed in an Bag.
|
![]() | BigListT |
BigList<T> provides a list of items, in order, with indices of the items ranging from 0 to one less
than the count of items in the collection. BigList<T> is optimized for efficient operations on large (>100 items)
lists, especially for insertions, deletions, copies, and concatinations.
|
![]() | CollectionBaseT |
CollectionBase is a base class that can be used to more easily implement the
generic ICollection<T> and non-generic ICollection interfaces.
|
![]() | DequeT | The Deque class implements a type of list known as a Double Ended Queue. A Deque is quite similar to a List, in that items have indices (starting at 0), and the item at any index can be efficiently retrieved. The difference between a List and a Deque lies in the efficiency of inserting elements at the beginning. In a List, items can be efficiently added to the end, but inserting an item at the beginning of the List is slow, taking time proportional to the size of the List. In a Deque, items can be added to the beginning or end equally efficiently, regardless of the number of items in the Deque. As a trade-off for this increased flexibility, Deque is somewhat slower than List (but still constant time) when being indexed to get or retrieve elements. |
![]() | DictionaryBaseTKey, TValue |
DictionaryBase is a base class that can be used to more easily implement the
generic IDictionary<T> and non-generic IDictionary interfaces.
|
![]() | ListBaseT |
ListBase is an abstract class that can be used as a base class for a read-write collection that needs
to implement the generic IList<T> and non-generic IList collections. The derived class needs
to override the following methods: Count, Clear, Insert, RemoveAt, and the indexer. The implementation
of all the other methods in IList<T> and IList are handled by ListBase.
|
![]() | MultiDictionaryTKey, TValue | The MultiDictionary class that associates values with a key. Unlike an Dictionary, each key can have multiple values associated with it. When indexing an MultiDictionary, instead of a single value associated with a key, you retrieve an enumeration of values. When constructed, you can chose to allow the same value to be associated with a key multiple times, or only one time. |
![]() | MultiDictionaryBaseTKey, TValue |
MultiDictionaryBase is a base class that can be used to more easily implement a class
that associates multiple values to a single key. The class implements the generic
IDictionary<TKey, ICollection<TValue>> interface.
|
![]() | OrderedBagT |
OrderedBag<T> is a collection that contains items of type T.
The item are maintained in a sorted order. Unlike a OrderedSet, duplicate items (items that
compare equal to each other) are allows in an OrderedBag.
|
![]() | OrderedBagTView |
The OrderedBag<T>.View class is used to look at a subset of the items
inside an ordered bag. It is returned from the Range, RangeTo, RangeFrom, and Reversed methods.
|
![]() | OrderedDictionaryTKey, TValue |
OrderedDictionary<TKey, TValue> is a collection that maps keys of type TKey
to values of type TValue. The keys are maintained in a sorted order, and at most one value
is permitted for each key.
|
![]() | OrderedDictionaryTKey, TValueView |
The OrderedDictionary<TKey,TValue>.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.
|
![]() | OrderedMultiDictionaryTKey, TValue | The OrderedMultiDictionary class that associates values with a key. Unlike an OrderedDictionary, each key can have multiple values associated with it. When indexing an OrderedMultidictionary, instead of a single value associated with a key, you retrieve an enumeration of values. All of the key are stored in sorted order. Also, the values associated with a given key are kept in sorted order as well. When constructed, you can chose to allow the same value to be associated with a key multiple times, or only one time. |
![]() | OrderedMultiDictionaryTKey, TValueView |
The OrderedMultiDictionary<TKey,TValue>.View class is used to look at a subset of the keys and values
inside an ordered multi-dictionary. It is returned from the Range, RangeTo, RangeFrom, and Reversed methods.
|
![]() | OrderedSetT |
OrderedSet<T> is a collection that contains items of type T.
The item are maintained in a sorted order, and duplicate items are not allowed. Each item has
an index in the set: the smallest item has index 0, the next smallest item has index 1,
and so forth.
|
![]() | OrderedSetTView |
The OrderedSet<T>.View class is used to look at a subset of the Items
inside an ordered set. It is returned from the Range, RangeTo, RangeFrom, and Reversed methods.
|
![]() | ReadOnlyCollectionBaseT |
ReadOnlyCollectionBase is a base class that can be used to more easily implement the
generic ICollection<T> and non-generic ICollection interfaces for a read-only collection:
a collection that does not allow adding or removing elements.
|
![]() | ReadOnlyDictionaryTKey, TValue | 只读的表示键和值(字典)的集合。 |
![]() | ReadOnlyDictionaryBaseTKey, TValue |
ReadOnlyDictionaryBase is a base class that can be used to more easily implement the
generic IDictionary<T> and non-generic IDictionary interfaces.
|
![]() | ReadOnlyListBaseT |
ReadOnlyListBase is an abstract class that can be used as a base class for a read-only collection that needs
to implement the generic IList<T> and non-generic IList collections. The derived class needs
to override the Count property and the get part of the indexer. The implementation
of all the other methods in IList<T> and IList are handled by ListBase.
|
![]() | ReadOnlyMultiDictionaryBaseTKey, TValue |
MultiDictionaryBase is a base class that can be used to more easily implement a class
that associates multiple values to a single key. The class implements the generic
IDictionary<TKey, ICollection<TValue>> interface. The resulting collection
is read-only -- items cannot be added or removed.
|
![]() | SetT |
Set<T> is a collection that contains items of type T.
The item are maintained in a haphazard, unpredictable order, and duplicate items are not allowed.
|
![]() | SyncDictionary | 同步的集合。 |
![]() | SyncDictionaryTKey, TValue | 同步的表示键和值(字典)的集合。 |
Structure | Description | |
---|---|---|
![]() | PairTFirst, TSecond |
Stores a pair of objects within a single struct. This struct is useful to use as the
T of a collection, or as the TKey or TValue of a dictionary.
|
![]() | TripleTFirst, TSecond, TThird |
Stores a triple of objects within a single struct. This struct is useful to use as the
T of a collection, or as the TKey or TValue of a dictionary.
|
Delegate | Description | |
---|---|---|
![]() | BinaryPredicateT |
The BinaryPredicate delegate type encapsulates a method that takes two
items of the same type, and returns a boolean value representating
some relationship between them. For example, checking whether two
items are equal or equivalent is one kind of binary predicate.
|