Class TranslationMap

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

    public class TranslationMap
    extends java.util.HashMap<java.util.Locale,​java.lang.String>
    Holds all of the translations for a specific key.
    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>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getKey()  
      TranslationMap merge​(TranslationMap other)
      Merges the translations from the provided map into this one, returning a new map as the result.
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, 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

        equals, hashCode
    • Constructor Detail

      • TranslationMap

        public TranslationMap​(java.lang.String key)
    • Method Detail

      • getKey

        public java.lang.String getKey()
      • merge

        public TranslationMap merge​(TranslationMap other)
        Merges the translations from the provided map into this one, returning a new map as the result. Preference is given to the incoming map, so if a locale exists in both, the translation from incoming will be used.

        If other is null, the return will simply be "this".