Package 

Class BiMultiMap

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Cloneable , java.util.Map

    
    public class BiMultiMap<K>
    extends HashMap<K, Object>
                        

    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.

    • Method Summary

      Modifier and Type Method Description
      void putAll(Map<out K, out Object> map)
      Object put(K key, Object value)
      Object put(K key, Collection values)
      Object remove(Object key)
      void clear()
      BiMultiMap<K> clone()
      K getKey(Object value) Reverse lookup of key by value.
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.util.Map

        copyOf, entry, of, ofEntries
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait