Summer.Batch.Common.Collections.OrderedSet< T > Class Template Reference
A set that preserves the insertion order. More...
Inheritance diagram for Summer.Batch.Common.Collections.OrderedSet< T >:
Public Member Functions | |
OrderedSet () | |
Constructs a new OrderedDictionary<TKey,TValue> with the default comparer. More... | |
OrderedSet (IEqualityComparer< T > comparer) | |
Constructs a new OrderedDictionary<TKey,TValue> with the specified comparer. More... | |
void | Clear () |
Clears the set. More... | |
bool | Remove (T item) |
Removes an item from the set. More... | |
IEnumerator< T > | GetEnumerator () |
Returns an enumerator that iterates through the set. More... | |
bool | Contains (T item) |
Determines whether the set contains a specific value. More... | |
void | CopyTo (T[] array, int arrayIndex) |
Copies the elements of the set to an array, preserving the order. More... | |
bool | Add (T item) |
Adds an item to the set. More... | |
Properties | |
int | Count [get] |
The number of elements in the collection. More... | |
virtual bool | IsReadOnly [get] |
Whether the set is readonly. More... | |
Detailed Description
A set that preserves the insertion order.
- Template Parameters
-
T The type of the elements in the set.
Constructor & Destructor Documentation
Constructs a new OrderedDictionary<TKey,TValue> with the default comparer.
Summer.Batch.Common.Collections.OrderedSet< T >.OrderedSet | ( | IEqualityComparer< T > | comparer | ) |
Constructs a new OrderedDictionary<TKey,TValue> with the specified comparer.
- Parameters
-
comparer The comparer to use for ordering elements.
Member Function Documentation
bool Summer.Batch.Common.Collections.OrderedSet< T >.Add | ( | T | item | ) |
Adds an item to the set.
- Parameters
-
item The item to add.
- Returns
tru
if the item was actually added;false
if it was alread present in the set.
void Summer.Batch.Common.Collections.OrderedSet< T >.Clear | ( | ) |
Clears the set.
bool Summer.Batch.Common.Collections.OrderedSet< T >.Contains | ( | T | item | ) |
Determines whether the set contains a specific value.
- Returns
true
if item is found in the set;false
otherwise.
- Parameters
-
item The object to locate in the set.
void Summer.Batch.Common.Collections.OrderedSet< T >.CopyTo | ( | T[] | array, |
int | arrayIndex | ||
) |
Copies the elements of the set to an array, preserving the order.
- Parameters
-
array The array to copy the elements to. arrayIndex The index where to start copying.
IEnumerator<T> Summer.Batch.Common.Collections.OrderedSet< T >.GetEnumerator | ( | ) |
Returns an enumerator that iterates through the set.
- Returns
- A IEnumerator<T> that can be used to iterate through the set.
bool Summer.Batch.Common.Collections.OrderedSet< T >.Remove | ( | T | item | ) |
Removes an item from the set.
- Parameters
-
item The item to remove.
- Returns
Property Documentation
|
get |
The number of elements in the collection.
|
get |
Whether the set is readonly.
The documentation for this class was generated from the following file:
- Summer.Batch.Common/Collections/OrderedSet.cs