[This is preliminary documentation and is subject to change.]
Represents a set of objects which can be accessed by value or
integer index.
Declaration Syntax
C# |
public class IndexedSet<T> : IEnumerable<T>, IEnumerable
Generic Template Parameters
- T
- The type of members in the set.
Members
All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
IndexedSet<(Of <(<'T>)>)>()()()() | Creates a new IndexedSet with the default capacity. | |
IndexedSet<(Of <(<'T>)>)>(Int32) | Creates a new IndexedSet with a particular capacity. | |
Add(T) | Adds a new member to this IndexedSet. | |
AddIfAbsent(T) | Adds a member to this IndexedSet only if it is not already
contained in it. | |
Capacity | Gets the current capacity of the IndexedSet. | |
Contains(T) | Determines whether an object is a member of this IndexedSet.
| |
Count | Gets the number of members of this IndexedSet. | |
Equals(Object) | (Inherited from Object.) | |
Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
GetEnumerator()()()() | Obtains an enumerator for the members of the set. This will
enumerate the members in their index order. | |
GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
Item[([( Int32])]) | Gets the member in the set with a particular index. | |
Item[([( T])]) | Gets the index of a particular member of the set. | |
MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
ToString()()()() | (Inherited from Object.) | |
TryGetValue(Int32, T%) | Gets the member in the set with a particular index. | |
TryGetValue(T, Int32%) | Gets the index of a particular member of the set. |
Remarks
Each member is allocated an integer index, and can be quickly
accessed by this index. Members can also be looked up by their value,
returning the index. A typical use of this would be for symbol tables. All
operations on this IndexedSet are O(1) except if the capacity is increased in
which case the operation is O(n) where n is the current value of Count.
Inheritance Hierarchy
Object | |
IndexedSet<(Of <(<'T>)>)> |