Class TranslationMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.util.Locale,java.lang.String>
-
- com.inductiveautomation.ignition.common.i18n.translation.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
-
-
Constructor Summary
Constructors Constructor Description TranslationMap(TranslationMap other)
TranslationMap(java.lang.String key)
-
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
-
-
-
-
Constructor Detail
-
TranslationMap
public TranslationMap(TranslationMap other)
-
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".
-
-