Skip to main content
Module

x/rimbu/hashed/map-custom/index.ts>HashMapContext

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class HashMapContext
implements [HashMap.Context]<UK>
Re-export
import { HashMapContext } from "https://deno.land/x/rimbu@0.14.0/hashed/map-custom/index.ts";

Constructors

new
HashMapContext(
hasher: Hasher<UK>,
eq: Eq<UK>,
blockSizeBits: number,
listContext: List.Context,
)

Properties

readonly
_empty: HashMap<any, any>
readonly
_emptyBlock: HashMapBlock<any, any>
readonly
blockCapacity: number
readonly
blockMask: number
readonly
builder: <K extends UK, V>() => HashMap.Builder<K, V>
readonly
maxDepth: number
readonly
typeTag: string

Methods

block<V>(
entries: (readonly [UK, V])[] | null,
entrySets: MapEntrySet<UK, V>[] | null,
size: number,
level: number,
): HashMapBlock<UK, V>
collision<V>(entries: List.NonEmpty<readonly [UK, V]>): HashMapCollision<UK, V>
createBuilder<K extends UK, V>(source?: HashMap.NonEmpty<K, V>): HashMap.Builder<K, V>
getKeyIndex(level: number, hash: number): number
hash(value: UK): number
isHashMapBlock<K, V>(obj: MapEntrySet<K, V>): obj is HashMapBlock<K, V>
isNonEmptyInstance(source: any): source is any
isValidKey(key: unknown): key is UK