Skip to content

opensavvy.pedestal.weak.algorithms

Additional pure-Kotlin implementations that are useful when no platform-specific implementation is available, when the exact same behavior must be provided on all platforms, or to help with testing.

Types

FakeWeakRef

Fake implementation of WeakRef.

Functions

asMultiplatform

Wraps a JVM WeakHashMap into a multiplatform WeakMap.

@ExperimentalWeakApi
fun <K : Any, V> WeakMap<K, V>.asMultiplatform(): WeakMap<K, V>

Wraps a JS WeakMap into a multiplatform WeakMap.

EmptyWeakMap

A WeakMap implementation that immediately frees its elements.

FakeWeakMap

A WeakMap implementation that isn't weak.

IdentitySoftKeyArrayMap

A pure-Kotlin common WeakMap implementation using SoftRef.

IdentityWeakKeyArrayMap

A pure-Kotlin common WeakMap implementation using WeakRef.

SoftKeyArrayMap

A pure-Kotlin common WeakMap implementation using SoftRef.

SoftValueHashMap

A pure-Kotlin common WeakMap implementation using SoftRef.

WeakKeyArrayMap

A pure-Kotlin common WeakMap implementation using WeakRef.

WeakValueHashMap

A pure-Kotlin common WeakMap implementation using WeakRef.