Class TypeHashMap<K,​V>

  • Type Parameters:
    K -
    V -
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<K,​V>, TypeMap<K,​V>

    public class TypeHashMap<K,​V>
    extends java.util.HashMap<K,​V>
    implements TypeMap<K,​V>
    HashMap implementation of TypeMap.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeHashMap()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void findAllKeys​(java.lang.Object key, java.util.Set<java.lang.Object> keys)
      Finds this key, if contained, and any contained supertype keys.
      java.lang.Object findKey​(java.lang.Object key)
      Finds this key or a supertype key if contained, or null if neither is not contained.
      V put​(K key, V value)
      • Methods inherited from class java.util.HashMap

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

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Constructor Detail

      • TypeHashMap

        public TypeHashMap()
    • Method Detail

      • findKey

        public java.lang.Object findKey​(java.lang.Object key)
        Finds this key or a supertype key if contained, or null if neither is not contained.
        Specified by:
        findKey in interface TypeMap<K,​V>
        Parameters:
        key - the key to find
        Returns:
        this key or a supertype key if contained, or null if neither is not contained
        See Also:
        Map.containsKey(Object)
      • findAllKeys

        public void findAllKeys​(java.lang.Object key,
                                java.util.Set<java.lang.Object> keys)
        Finds this key, if contained, and any contained supertype keys.
        Specified by:
        findAllKeys in interface TypeMap<K,​V>
        Parameters:
        key - the key to find
        keys - the collection in which to store the found keys
        See Also:
        TypeMap.findAllKeys(java.lang.Object, java.util.Set)
      • put

        public V put​(K key,
                     V value)
        Specified by:
        put in interface java.util.Map<K,​V>
        Overrides:
        put in class java.util.HashMap<K,​V>