Class HashMapResourceBundle

java.lang.Object
java.util.ResourceBundle
com.globalmentor.util.HashMapResourceBundle

public class HashMapResourceBundle extends ResourceBundle
A resource bundle backed by a hash map.
Author:
Garret Wilson
See Also:
  • Constructor Details

    • HashMapResourceBundle

      public HashMapResourceBundle()
      Default constructor with no parent using a hash map.
    • HashMapResourceBundle

      public HashMapResourceBundle(ResourceBundle parent)
      Parent constructor using a hash map.
      Parameters:
      parent - The parent resource bundle, or null if there should be no parent for resolving resources.
    • HashMapResourceBundle

      public HashMapResourceBundle(Map<?,?> map)
      Map constructor with no parent. Keys will be converted to strings.
      Parameters:
      map - The map containing the resource mappings which will be copied to this map.
      Throws:
      NullPointerException - if the given map is null.
    • HashMapResourceBundle

      public HashMapResourceBundle(Map<?,?> map, ResourceBundle parent)
      Map and parent constructor. All values will be copied to the map. Keys will be converted to strings.
      Parameters:
      map - The map containing the resource mappings which will be copied to this map.
      parent - The parent resource bundle, or null if there should be no parent for resolving resources.
      Throws:
      NullPointerException - if the given map is null.
  • Method Details