Click or drag to resize
X3Platform.Collections Namespace
 
Classes
  ClassDescription
Public classAlgorithms
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>.
Public classBagT
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.
Public classBigListT
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.
Public classCollectionBaseT
CollectionBase is a base class that can be used to more easily implement the generic ICollection<T> and non-generic ICollection interfaces.
Public classDequeT

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.

Public classDictionaryBaseTKey, TValue
DictionaryBase is a base class that can be used to more easily implement the generic IDictionary<T> and non-generic IDictionary interfaces.
Public classListBaseT
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.
Public classMultiDictionaryTKey, 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.

Public classMultiDictionaryBaseTKey, 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.
Public classOrderedBagT
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.
Public classOrderedBagTView
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.
Public classOrderedDictionaryTKey, 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.
Public classOrderedDictionaryTKey, 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.
Public classOrderedMultiDictionaryTKey, 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.

Public classOrderedMultiDictionaryTKey, 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.
Public classOrderedSetT
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.
Public classOrderedSetTView
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.
Public classReadOnlyCollectionBaseT
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.
Public classReadOnlyDictionaryTKey, TValue
只读的表示键和值(字典)的集合。
Public classReadOnlyDictionaryBaseTKey, TValue
ReadOnlyDictionaryBase is a base class that can be used to more easily implement the generic IDictionary<T> and non-generic IDictionary interfaces.
Public classReadOnlyListBaseT
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.
Public classReadOnlyMultiDictionaryBaseTKey, 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.
Public classSetT
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.
Public classSyncDictionary
同步的集合。
Public classSyncDictionaryTKey, TValue
同步的表示键和值(字典)的集合。
Structures
  StructureDescription
Public structurePairTFirst, 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.
Public structureTripleTFirst, 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.
Delegates
  DelegateDescription
Public delegateBinaryPredicateT
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.