Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | List of all members
Joutsen.Collections.Generic.HashSet< ItemType > Class Template Reference

A set of unique items that are stored using hashes. More...

Public Member Functions

 HashSet ()
 Creates a new empty set. More...
 
 HashSet (SCG.IEnumerable< ItemType > enumerable)
 Creates a new set that initially contains predefined items. More...
 
 HashSet (ItemType[] array)
 Creates a new set that initially contains predefined items. More...
 
 HashSet (SCG.IEqualityComparer< ItemType > comparer)
 Creates a new set using a custom comparer to calculate hash codes. More...
 
 HashSet (SCG.IEnumerable< ItemType > enumerable, SCG.IEqualityComparer< ItemType > comparer)
 Creates a new set that initially contains predefined items using a custom comparer to calculate hashes. More...
 
 HashSet (ItemType[] array, SCG.EqualityComparer< ItemType > comparer)
 Creates a new set that initially contains predefined items using a custom comparer to calculate hashes. More...
 
void Add (SCG.IEnumerable< ItemType > items)
 Adds multiple items to the collection. More...
 
override String ToString ()
 
bool Contains (ItemType item, SCG.IEqualityComparer< ItemType > comparer)
 Checks if an item is part of the collection. More...
 
void Add (SCG.IEnumerable< ItemType > items)
 Adds multiple items to the collection. More...
 

Detailed Description

A set of unique items that are stored using hashes.

Since
0.4.0

Constructor & Destructor Documentation

◆ HashSet() [1/6]

Creates a new empty set.

◆ HashSet() [2/6]

Joutsen.Collections.Generic.HashSet< ItemType >.HashSet ( SCG.IEnumerable< ItemType >  enumerable)

Creates a new set that initially contains predefined items.

Parameters
enumerablethe predefined items

◆ HashSet() [3/6]

Joutsen.Collections.Generic.HashSet< ItemType >.HashSet ( ItemType[]  array)

Creates a new set that initially contains predefined items.

Parameters
arraythe predefined items

◆ HashSet() [4/6]

Joutsen.Collections.Generic.HashSet< ItemType >.HashSet ( SCG.IEqualityComparer< ItemType >  comparer)

Creates a new set using a custom comparer to calculate hash codes.

Parameters
comparerthe custom comparer to calculate hashes

◆ HashSet() [5/6]

Joutsen.Collections.Generic.HashSet< ItemType >.HashSet ( SCG.IEnumerable< ItemType >  enumerable,
SCG.IEqualityComparer< ItemType >  comparer 
)

Creates a new set that initially contains predefined items using a custom comparer to calculate hashes.

Parameters
enumerablethe predefined items
comparerthe custom comparer to calculate hashes

◆ HashSet() [6/6]

Joutsen.Collections.Generic.HashSet< ItemType >.HashSet ( ItemType[]  array,
SCG.EqualityComparer< ItemType >  comparer 
)

Creates a new set that initially contains predefined items using a custom comparer to calculate hashes.

Parameters
arraythe predefined items
comparerthe custom comparer to calculate hashes

Member Function Documentation

◆ Add()

void Joutsen.Collections.Generic.HashSet< ItemType >.Add ( SCG.IEnumerable< ItemType >  items)

Adds multiple items to the collection.

Parameters
itemsthe items to add

Implements Joutsen.Collections.Generic.Collection< ItemType >.

◆ ToString()

override String Joutsen.Collections.Generic.HashSet< ItemType >.ToString ( )