Class TranslationBundle
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.i18n.translation.TranslationBundle
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class TranslationBundle extends java.lang.Object implements java.io.SerializableThis class contains translated terms for a specific locale.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringTRAN_PLACEHOLDERThis sentinal value is used to build a map that contains all of the keys, it indicates that the specific key doesn't have a translation.
 - 
Constructor SummaryConstructors Constructor Description TranslationBundle()For serializationTranslationBundle(TranslationBundle copy)TranslationBundle(java.util.Locale locale)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(TermKey key, java.lang.String value)booleancontains(TermKey key)protected java.util.Set<java.util.Map.Entry<TermKey,java.lang.String>>entries()booleanequals(java.lang.Object obj)java.lang.Stringget(TermKey key)Returns the term, if present, or null if not.java.util.LocalegetLocale()java.lang.StringgetOrNull(TermKey key)Returns the value, or null if the key isn't present, OR the "no translation" placeholder is present.java.util.Map<TermKey,java.lang.String>getValues()inthashCode()voidmerge(TranslationBundle bundle)booleanremove(TermKey key)Removes the key and its translation, returning whether or not it was present.voidsetLocale(java.util.Locale locale)voidsetValues(java.util.Map<TermKey,java.lang.String> values)intsize()java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
TRAN_PLACEHOLDERpublic static final java.lang.String TRAN_PLACEHOLDER This sentinal value is used to build a map that contains all of the keys, it indicates that the specific key doesn't have a translation.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
TranslationBundlepublic TranslationBundle() For serialization
 - 
TranslationBundlepublic TranslationBundle(java.util.Locale locale) 
 - 
TranslationBundlepublic TranslationBundle(TranslationBundle copy) 
 
- 
 - 
Method Detail- 
getLocalepublic java.util.Locale getLocale() 
 - 
setLocalepublic void setLocale(java.util.Locale locale) 
 - 
getValuespublic java.util.Map<TermKey,java.lang.String> getValues() 
 - 
setValuespublic void setValues(java.util.Map<TermKey,java.lang.String> values) 
 - 
entriesprotected java.util.Set<java.util.Map.Entry<TermKey,java.lang.String>> entries() 
 - 
getpublic java.lang.String get(TermKey key) Returns the term, if present, or null if not.
 - 
getOrNullpublic java.lang.String getOrNull(TermKey key) Returns the value, or null if the key isn't present, OR the "no translation" placeholder is present.
 - 
containspublic boolean contains(TermKey key) 
 - 
addpublic void add(TermKey key, java.lang.String value) 
 - 
removepublic boolean remove(TermKey key) Removes the key and its translation, returning whether or not it was present.
 - 
mergepublic void merge(TranslationBundle bundle) 
 - 
sizepublic int size() 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-