shadow:standard

Interface CanHash

interface CanHash

Interface CanHash specifies that a class can produce a hash code of type uint whose value is determined by all data specific to a given object. For classes which also implement CanEqual<T>, objects which are considered identical should have the same hash codes. This interface is required for any classes that will be used as a key in a hash table, such as HashMap<K,V>.

See Also

Property Summary

Modifiers Return Types Method and Description
public get (ulong) hash()

Property read from to retrieve the hash code.

Property Detail

hash

public get hash() => (ulong)

Property read from to retrieve the hash code. Hash codes should be fast to compute and also change whenever any internal state of the object changes. Identical objects should always produce the same hash code. Because only 64 bits are used to store the code, some objects which are not identical will have the same hash codes, but every effort should be made to reduce this likelihood.

Returns

hash code