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
comparerThe comparer to use for ordering elements.

Member Function Documentation

bool Summer.Batch.Common.Collections.OrderedSet< T >.Add ( item)

Adds an item to the set.

Parameters
itemThe item to add.
Returns
tru if the item was actually added; false if it was alread present in the set.

Clears the set.

bool Summer.Batch.Common.Collections.OrderedSet< T >.Contains ( item)

Determines whether the set contains a specific value.

Returns
true if item is found in the set; false otherwise.
Parameters
itemThe 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
arrayThe array to copy the elements to.
arrayIndexThe 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 ( item)

Removes an item from the set.

Parameters
itemThe item to remove.
Returns

Property Documentation

The number of elements in the collection.

virtual bool Summer.Batch.Common.Collections.OrderedSet< T >.IsReadOnly
get

Whether the set is readonly.


The documentation for this class was generated from the following file:
  • Summer.Batch.Common/Collections/OrderedSet.cs