LocalizedTexts (API Reference)
Package com.here.sdk.core
Class LocalizedTexts
java.lang.Object
com.here.sdk.core.LocalizedTexts
The list of multiple names or titles for the same entity, possibly in different languages.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the default value.getPreferredValueForLocales(List<Locale> locales) Returns best name or title to be presented to the user according to specified locales.inthashCode()
-
Field Details
-
items
The list of text items. Recommended to use helper methods instead of directly accessing the items.
-
-
Constructor Details
-
LocalizedTexts
public LocalizedTexts()Creates a new instance.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getPreferredValueForLocales
Returns best name or title to be presented to the user according to specified locales. The locales are expected to be ordered by priority. If no matching locale found - the default is returned. In case of empty list returns
null.- Parameters:
locales-Locales that will be used to translate name or title.
- Returns:
Returns best name or title to be presented to the user according to specified locales.
-
getDefaultValue
Returns the default value. In case of empty list return
null.- Returns:
Returns the default value.
-