Class StringMap

  • All Implemented Interfaces:
    java.util.Map<java.lang.String,​java.lang.Object>

    public class StringMap
    extends java.util.AbstractMap<java.lang.String,​java.lang.Object>
    Simple utility class that creates a map for string-based keys. This map can be set to use case-sensitive or case-insensitive comparison when searching for the key. Any keys put into this map will be converted to a String using the toString() method, since it is only intended to compare strings.
    • 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
      StringMap()  
      StringMap​(java.util.Map<? extends java.lang.Object,​? extends java.lang.Object> map)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean containsKey​(java.lang.Object arg0)  
      boolean containsValue​(java.lang.Object arg0)  
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()  
      java.lang.Object get​(java.lang.Object arg0)  
      boolean isEmpty()  
      java.lang.Object put​(java.lang.String key, java.lang.Object value)  
      void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.Object> map)  
      java.lang.Object remove​(java.lang.Object arg0)  
      int size()  
      • Methods inherited from class java.util.AbstractMap

        clone, equals, hashCode, keySet, 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

      • StringMap

        public StringMap()
      • StringMap

        public StringMap​(java.util.Map<? extends java.lang.Object,​? extends java.lang.Object> map)
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        size in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • isEmpty

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

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

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

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

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

        public void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.Object> map)
        Specified by:
        putAll in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        putAll in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • remove

        public java.lang.Object remove​(java.lang.Object arg0)
        Specified by:
        remove in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        remove in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        clear in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.String,​java.lang.Object>
        Specified by:
        entrySet in class java.util.AbstractMap<java.lang.String,​java.lang.Object>