BiMultiMap

open class BiMultiMap<K> : HashMap<K, V>

Extension of HashMap that provides two main features. Firstly it allows reverse lookup for a key given a value, by storing a second HashMap internally which maps values to keys. Secondly, it supports Collection values, in which case, each item in the collection is used as a key in the internal reverse HashMap. It's therefore up to the caller to ensure the overall set of values, and collection values, are unique.

Used by GeoJsonRenderer to store GeoJsonFeature instances mapped to corresponding Marker, Polyline, and Polygon map objects. We want to look these up in reverse to provide access to GeoJsonFeature instances when map objects are clicked.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun clear()
Link copied to clipboard
open fun clone(): BiMultiMap<K>
Link copied to clipboard
open fun compute(key: K, remappingFunction: BiFunction<in K, in V, out V>): V
Link copied to clipboard
open fun computeIfAbsent(key: K, mappingFunction: (in K) -> out V): V
Link copied to clipboard
open fun computeIfPresent(key: K, remappingFunction: BiFunction<in K, in V, out V>): V
Link copied to clipboard
open fun containsKey(key: Any): Boolean
Link copied to clipboard
open fun containsValue(value: Any): Boolean
Link copied to clipboard
open fun <K, V> copyOf(map: Map<out K, out V>): Map<K, V>
Link copied to clipboard
open fun <K, V> entry(k: K, v: V): Map.Entry<K, V>
Link copied to clipboard
open fun entrySet(): Set<Map.Entry<K, V>>
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun forEach(action: BiConsumer<in K, in V>)
Link copied to clipboard
open fun get(key: Any): V
Link copied to clipboard
open fun getKey(value: Any): K
Reverse lookup of key by value.
Link copied to clipboard
open fun getOrDefault(key: Any, defaultValue: V): V
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun keySet(): Set<K>
Link copied to clipboard
open fun merge(key: K, value: V, remappingFunction: BiFunction<in V, in V, out V>): V
Link copied to clipboard
open fun <K, V> of(): Map<K, V>
Link copied to clipboard
open fun <K, V> ofEntries(entries: Array<Map.Entry<out K, out V>>): Map<K, V>
Link copied to clipboard
open fun put(key: K, value: Any): Any
open fun put(key: K, values: Collection): Any
Link copied to clipboard
open fun putAll(map: Map<out K, out Any>)
Link copied to clipboard
open fun putIfAbsent(key: K, value: V): V
Link copied to clipboard
open fun remove(key: Any): Any
open fun remove(key: Any, value: Any): Boolean
Link copied to clipboard
open fun replace(key: K, value: V): V
open fun replace(key: K, oldValue: V, newValue: V): Boolean
Link copied to clipboard
open fun replaceAll(function: BiFunction<in K, in V, out V>)
Link copied to clipboard
open fun size(): Int
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun values(): Collection<V>