|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.LocalizedTextMap
public class LocalizedTextMap
A collection of LocalizedTexts. The class is used to hold available LocalizedText values in different locales. You can add a new text with any Locale into the map, and retrieve an entry with any Locale. If the specific Locale has no text defined, the DefaultLocale is used.
| Constructor Summary | |
|---|---|
LocalizedTextMap()
Create new empty LocalizedTextMap. |
|
LocalizedTextMap(org.opcfoundation.ua.builtintypes.LocalizedText defaultText)
Create a new LocalizedTextMap with the defined text as default. |
|
LocalizedTextMap(String defaultText,
Locale defaultLocale)
Create a new LocalizedTextMap with the defined text as default. |
|
| Method Summary | |
|---|---|
static LocalizedTextMap[] |
createMany(org.opcfoundation.ua.builtintypes.LocalizedText[] defaultTexts)
Create an array of LocalizedTextMaps. |
static org.opcfoundation.ua.builtintypes.LocalizedText[] |
getArrayValues(LocalizedTextMap[] array,
Locale locale)
Create an array of LocalizedText by calling
getLocalizedText(Locale) for each LocalizedTextMap given as
parameter with the given locale. |
Locale |
getDefaultLocale()
Returns the locale that is used for texts that do not have locale-specific text set. |
org.opcfoundation.ua.builtintypes.LocalizedText |
getLocalizedText(Locale locale)
Get LocalizedText for the defined locale. |
org.opcfoundation.ua.builtintypes.LocalizedText |
getLocalizedText(String localeId)
Get LocalizedText for the given localeId. |
String |
getText(Locale locale)
Get text for the defined locale. |
boolean |
hasText(Locale locale)
Check if the map contains a localized text for the defined locale. |
void |
setLocalizedText(org.opcfoundation.ua.builtintypes.LocalizedText localizedText)
Set the text for a specific locale, as defined by a LocalizedText The method calls setText using the locale and text from the localizedText. |
void |
setText(String text,
Locale locale)
Define the text for a specific locale |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocalizedTextMap()
LocalizedTextMap.
public LocalizedTextMap(org.opcfoundation.ua.builtintypes.LocalizedText defaultText)
defaultText - the default localized text. If null, LocalizedText.NULL is used.
public LocalizedTextMap(String defaultText,
Locale defaultLocale)
defaultText - the default localized textdefaultLocale - the default locale to use.| Method Detail |
|---|
public static LocalizedTextMap[] createMany(org.opcfoundation.ua.builtintypes.LocalizedText[] defaultTexts)
LocalizedTextMaps. Returned array is equal length and each has the
corresponding index as entry.
public static org.opcfoundation.ua.builtintypes.LocalizedText[] getArrayValues(LocalizedTextMap[] array,
Locale locale)
LocalizedText by calling
getLocalizedText(Locale) for each LocalizedTextMap given as
parameter with the given locale.
public Locale getDefaultLocale()
public org.opcfoundation.ua.builtintypes.LocalizedText getLocalizedText(Locale locale)
locale - the desired locale. If null, the defaultLocale is used
public org.opcfoundation.ua.builtintypes.LocalizedText getLocalizedText(String localeId)
LocalizedText for the given localeId.
localeId - the localeId
public String getText(Locale locale)
locale - the desired locale
public boolean hasText(Locale locale)
locale - the locale to check
public void setLocalizedText(org.opcfoundation.ua.builtintypes.LocalizedText localizedText)
localizedText - the localized text to add to the map. If null, LocalizedText.NULL is used.
public void setText(String text,
Locale locale)
text - the text for the localelocale - the locale to define. Use null to define the text for the defaultLocalepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||