Class ResourceBundleMapWrapper

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

    public class ResourceBundleMapWrapper
    extends java.lang.Object
    implements java.util.Map<java.lang.String,​java.lang.Object>, java.io.Serializable
    Generic ResourceBundle Map Wrapper, given ResourceBundle allows it to be used as a Map
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ResourceBundleMapWrapper.InternalRbmWrapper  
      • Nested classes/interfaces inherited from interface java.util.Map

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

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​java.lang.Object> context  
      protected java.util.ResourceBundle initialResourceBundle  
      static java.lang.String module  
      protected MapStack<java.lang.String> rbmwStack  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ResourceBundleMapWrapper()  
        ResourceBundleMapWrapper​(java.util.ResourceBundle initialResourceBundle)
      When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.
        ResourceBundleMapWrapper​(java.util.ResourceBundle initialResourceBundle, java.util.Map<java.lang.String,​java.lang.Object> context)
      When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.
        ResourceBundleMapWrapper​(ResourceBundleMapWrapper.InternalRbmWrapper initialInternalRbmWrapper)
      When creating new from a InternalRbmWrapper the one passed to the constructor should be the most specific or local InternalRbmWrapper, with more common ones pushed onto the stack progressively.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBottomResourceBundle​(java.lang.String resource)
      Don't pass the locale to make sure it has the same locale as the base
      void addBottomResourceBundle​(java.util.ResourceBundle topResourceBundle)
      Puts ResourceBundle on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)
      void addBottomResourceBundle​(ResourceBundleMapWrapper.InternalRbmWrapper topInternalRbmWrapper)
      Puts InternalRbmWrapper on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)
      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)  
      java.util.ResourceBundle getInitialResourceBundle()  
      boolean isEmpty()  
      java.util.Set<java.lang.String> keySet()  
      void pushResourceBundle​(java.util.ResourceBundle topResourceBundle)
      In general we don't want to use this, better to start with the more specific ResourceBundle and add layers of common ones...
      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> arg0)  
      java.lang.Object remove​(java.lang.Object arg0)  
      int size()  
      java.util.Collection<java.lang.Object> values()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • module

        public static final java.lang.String module
      • rbmwStack

        protected MapStack<java.lang.String> rbmwStack
      • initialResourceBundle

        protected java.util.ResourceBundle initialResourceBundle
      • context

        protected java.util.Map<java.lang.String,​java.lang.Object> context
    • Constructor Detail

      • ResourceBundleMapWrapper

        protected ResourceBundleMapWrapper()
      • ResourceBundleMapWrapper

        public ResourceBundleMapWrapper​(ResourceBundleMapWrapper.InternalRbmWrapper initialInternalRbmWrapper)
        When creating new from a InternalRbmWrapper the one passed to the constructor should be the most specific or local InternalRbmWrapper, with more common ones pushed onto the stack progressively.
      • ResourceBundleMapWrapper

        public ResourceBundleMapWrapper​(java.util.ResourceBundle initialResourceBundle)
        When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.
      • ResourceBundleMapWrapper

        public ResourceBundleMapWrapper​(java.util.ResourceBundle initialResourceBundle,
                                        java.util.Map<java.lang.String,​java.lang.Object> context)
        When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.
    • Method Detail

      • addBottomResourceBundle

        public void addBottomResourceBundle​(java.util.ResourceBundle topResourceBundle)
        Puts ResourceBundle on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)
      • addBottomResourceBundle

        public void addBottomResourceBundle​(ResourceBundleMapWrapper.InternalRbmWrapper topInternalRbmWrapper)
        Puts InternalRbmWrapper on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)
      • addBottomResourceBundle

        public void addBottomResourceBundle​(java.lang.String resource)
        Don't pass the locale to make sure it has the same locale as the base
      • pushResourceBundle

        public void pushResourceBundle​(java.util.ResourceBundle topResourceBundle)
        In general we don't want to use this, better to start with the more specific ResourceBundle and add layers of common ones... Puts ResourceBundle on the top of the stack (top meaning will override lower layers on the stack)
      • getInitialResourceBundle

        public java.util.ResourceBundle getInitialResourceBundle()
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<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>
      • containsValue

        public boolean containsValue​(java.lang.Object arg0)
        Specified by:
        containsValue in interface java.util.Map<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>
      • get

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

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

        public java.util.Set<java.lang.String> keySet()
        Specified by:
        keySet in interface java.util.Map<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>
      • putAll

        public void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.Object> arg0)
        Specified by:
        putAll in interface java.util.Map<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>
      • size

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

        public java.util.Collection<java.lang.Object> values()
        Specified by:
        values in interface java.util.Map<java.lang.String,​java.lang.Object>