FastHash

class FastHash<T>(val o: T)

A wrapper class for usage of immutable objects as Keys in HashMaps/HashSets. The wrapper calls hashCode() of the wrapped object only once and caches its result. This is valid for immutable objects and speeds up HashMaps/HashSets operations considerably.

Constructors

Link copied to clipboard
constructor(o: T)

Create empty Hash csaf

Properties

Link copied to clipboard
val o: T

The wrapped immutable object

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String