Class StringKeysMap<V>

  • All Implemented Interfaces:
    java.util.Map<java.lang.String,​V>
    Direct Known Subclasses:
    AttributesMap, ParameterMap

    public abstract class StringKeysMap<V>
    extends java.util.AbstractMap<java.lang.String,​V>
    A skeletal implementation for Map to wrap something with enumeration of keys, which must be String.
    Since:
    3.0.0
    Author:
    tomyeh
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  StringKeysMap.EntryIter
      The iterator class used to iterator the entries in this map.
      • 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>
    • Constructor Summary

      Constructors 
      Constructor Description
      StringKeysMap()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.Object key)  
      V get​(java.lang.Object key)  
      protected abstract java.util.Enumeration<java.lang.String> getKeys()
      Returns an enumeration of keys.
      protected abstract V getValue​(java.lang.String key)
      Returns the value associated with the specified key.
      protected abstract void removeValue​(java.lang.String key)
      Removes the specified key.
      protected abstract void setValue​(java.lang.String key, V value)
      Sets the value associated with the specified key.
      • Methods inherited from class java.util.AbstractMap

        clear, clone, containsValue, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
      • Methods inherited from class java.lang.Object

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

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • StringKeysMap

        public StringKeysMap()
    • Method Detail

      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<java.lang.String,​V>
        Overrides:
        containsKey in class java.util.AbstractMap<java.lang.String,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<java.lang.String,​V>
        Overrides:
        get in class java.util.AbstractMap<java.lang.String,​V>
      • getValue

        protected abstract V getValue​(java.lang.String key)
        Returns the value associated with the specified key.
      • getKeys

        protected abstract java.util.Enumeration<java.lang.String> getKeys()
        Returns an enumeration of keys.
      • setValue

        protected abstract void setValue​(java.lang.String key,
                                         V value)
        Sets the value associated with the specified key.
      • removeValue

        protected abstract void removeValue​(java.lang.String key)
        Removes the specified key.