Class HashSetPool<T>
Defines a system used to store and retrieve System.Collections.Generic.HashSet<T> objects.
Inheritance
System.Object
HashSetPool<T>
Implements
IPool<System.Collections.Generic.HashSet<T>>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Exiled.API.Features.Pools
Assembly: Exiled.API.dll
Syntax
public class HashSetPool<T> : IPool<HashSet<T>>
Type Parameters
Name | Description |
---|---|
T | The type of the objects in the hash set. |
Properties
| Improve this Doc View SourcePool
Gets a HashSetPool<T> that stores hash sets.
Declaration
public static HashSetPool<T> Pool { get; }
Property Value
Type | Description |
---|---|
HashSetPool<T> |
Methods
| Improve this Doc View SourceGet()
Declaration
public HashSet<T> Get()
Returns
Type | Description |
---|---|
System.Collections.Generic.HashSet<T> |
Get(IEnumerable<T>)
Retrieves a stored object of type System.Collections.Generic.HashSet<T>, or creates it if it does not exist. The hashset will be filled with all the provided items
.
Declaration
public HashSet<T> Get(IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | items | The items to fill the hashset with. |
Returns
Type | Description |
---|---|
System.Collections.Generic.HashSet<T> | The stored object, or a new object, of type System.Collections.Generic.HashSet<T>. |
Return(HashSet<T>)
Declaration
public void Return(HashSet<T> obj)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.HashSet<T> | obj |
ToArrayReturn(HashSet<T>)
Returns the System.Collections.Generic.HashSet<T> to the pool and returns its contents as an array.
Declaration
public T[] ToArrayReturn(HashSet<T> obj)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.HashSet<T> | obj | The System.Collections.Generic.HashSet<T> to return. |
Returns
Type | Description |
---|---|
T[] | The contents of the returned hashset as an array. |
Implements
Extension Methods
See Also
DictionaryPool<TKey, TValue>
ListPool<T>