Class LinkedIdentityHashMap<K,V>

java.lang.Object
com.google.javascript.jscomp.base.LinkedIdentityHashMap<K,V>
All Implemented Interfaces:
Serializable

public final class LinkedIdentityHashMap<K,V> extends Object implements Serializable
A deterministic drop-in replacement for IdentityHashMap.

This class is actually "map-like" in that it doesn't fully implement the

invalid reference
Map
interface. Only the methods needed to eliminate IdentityHashMap were defined. The entire interface could be satisfied in the future if necessary.
See Also:
  • Constructor Details

    • LinkedIdentityHashMap

      public LinkedIdentityHashMap()
  • Method Details

    • get

      public @Nullable V get(K key)
    • put

      @CanIgnoreReturnValue public @Nullable V put(K key, V value)
    • computeIfAbsent

      @CanIgnoreReturnValue public @Nullable V computeIfAbsent(K key, Function<? super K,? extends V> fn)
    • merge

      @CanIgnoreReturnValue public @Nullable V merge(K key, V value, BiFunction<? super V,? super V,? extends V> fn)
    • forEach

      public void forEach(BiConsumer<? super K,? super V> fn)