Companion

object Companion

Functions

Link copied to clipboard
fun <K, V : Any> concurrentHashMap(map: ConcurrentMutableMap<K, V> = ConcurrentMutableMap()): MapLikeCollection<K, V>

Wraps the map in a MapLikeCollection.

Link copied to clipboard

Wraps the map in a MapLikeCollection, data will be copied on read to prevent modification exceptions.

Link copied to clipboard

Wraps the map in a MapLikeCollection, this assumes that the map can safely be accessed concurrently.

Link copied to clipboard
fun <KEY, VALUE : Any> MapLikeCollection.Companion.lruLinkedHashMap(maxSize: Int): MapLikeCollection<KEY, VALUE>

Creates a least recently used map using a LinkedHashMap. The map will start evicting entries once maxSize has been reached.

Link copied to clipboard
fun <K, V : Any> none(): MapLikeCollection<K, V>

Returns an empty immutable MapLikeCollection. This collection will always return null and empty flows and ignores inserted valued.

Link copied to clipboard
fun <K, V : Any> readOnly(map: Map<K, V>): MapLikeCollection<K, V>

Wraps the map in a MapLikeCollection that ignores inserted values.

Link copied to clipboard
fun <KEY, VALUE : Any> MapLikeCollection.Companion.weakHashMap(): MapLikeCollection<KEY, VALUE>

Wraps a WeakHashMap into a MapLikeCollection.