Hashing

inline fun <Element> Hashing(crossinline hasher: (Element) -> Int): Hashing<Element>(source)

Hashing builder from a hasher that computes hash of provided element.

Creates a custom Hashing context using the provided hashing logic.

Return

A Hashing instance that uses the provided hasher function for hash code computation.

Parameters

hasher

A function that takes an element and returns its hash code.

Type Parameters

Element

The type of elements this hashing context will handle.