HashTableConstants Class
This class provides constants for customizing the behavior of a LinkedHashSet<T> instance.
public sealed class HashTableConstants
- Inheritance
-
Hash
Table Constants
Remarks
Do not use this class for anything other than unit testing.
Constructors
Hash |
Initializes a new instance of the HashTableConstants class. |
Properties
Max |
Gets the maximum capacity. |
Max |
Gets the maximum size. |
Max |
Gets the maximum roast. |
Methods
Get |
Gets the initial capacity which is the smallest power-of-two number equal to or greater then the specified value. If the value is greater than MaxCapacity, returns MaxCapacity. |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
HashTableConstants(int, int, int)
Initializes a new instance of the HashTableConstants class.
public HashTableConstants(int maxCapacity, int maxSize, int maxRoast)
Parameters
- maxCapacity
- int
The maximum capacity that represents the maximum length of the array.
- maxSize
- int
The maximum size.
- maxRoast
- int
The maximum roast.
Properties Detail
MaxCapacity
Gets the maximum capacity.
public int MaxCapacity { get; }
Property Value
MaxSize
Gets the maximum size.
public int MaxSize { get; }
Property Value
MaxRoast
Gets the maximum roast.
public int MaxRoast { get; }
Property Value
Methods Detail
GetCapacity(int)
Gets the initial capacity which is the smallest power-of-two number equal to or greater then the specified value. If the value is greater than MaxCapacity, returns MaxCapacity.
public int GetCapacity(int n)
Parameters
- n
- int
The preferred capacity.
Returns
The initial capacity.