HashTableConstants Class

This class provides constants for customizing the behavior of a LinkedHashSet<T> instance.

C#
public sealed class HashTableConstants
Inheritance
HashTableConstants

Remarks

Do not use this class for anything other than unit testing.

Constructors

HashTableConstants(int, int, int)

Initializes a new instance of the HashTableConstants class.

Properties

MaxCapacity

Gets the maximum capacity.

MaxSize

Gets the maximum size.

MaxRoast

Gets the maximum roast.

Methods

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.

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.

C#
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.

C#
public int MaxCapacity { get; }

Property Value

int

MaxSize

Gets the maximum size.

C#
public int MaxSize { get; }

Property Value

int

MaxRoast

Gets the maximum roast.

C#
public int MaxRoast { get; }

Property Value

int

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.

C#
public int GetCapacity(int n)

Parameters

n
int

The preferred capacity.

Returns

int

The initial capacity.