VisitorMap

open class VisitorMap<N : Node?, V> : Map<N, V> (source)

A map that overrides the equals and hashcode calculation of the added nodes by using another equals and hashcode visitor for those methods.

Constructors

Link copied to clipboard
constructor(hashcodeVisitor: GenericVisitor<Integer, Void>, equalsVisitor: GenericVisitor<Boolean, Visitable>)
Pass the visitors to use for equals and hashcode.

Functions

Link copied to clipboard
open fun clear()
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<N, V>>
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 getOrDefault(key: Any, defaultValue: V): V
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun keySet(): Set<N>
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: N, value: V): V
Link copied to clipboard
open fun putAll(m: Map<out N, out V>)
Link copied to clipboard
open fun putIfAbsent(key: K, value: V): V
Link copied to clipboard
open fun remove(key: Any): V
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 values(): Collection<V>