Class LocalizedTexts
Package com.here.sdk.core
Class LocalizedTexts
- java.lang.Object
-
- com.here.sdk.core.LocalizedTexts
-
public final class LocalizedTexts extends java.lang.ObjectThe list of multiple names or titles for the same entity, possibly in different languages.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<LocalizedText>itemsThe list of text items.
-
Constructor Summary
Constructors Constructor Description LocalizedTexts()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetDefaultValue()Returns the default value.java.lang.StringgetPreferredValueForLocales(java.util.List<java.util.Locale> locales)Returns best name or title to be presented to the user according to specified locales.inthashCode()
-
-
-
Field Detail
-
items
@NonNull public java.util.List<LocalizedText> items
The list of text items. Recommended to use helper methods instead of directly accessing the items.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getPreferredValueForLocales
@Nullable public java.lang.String getPreferredValueForLocales(@NonNull java.util.List<java.util.Locale> locales)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
@Nullable public java.lang.String getDefaultValue()
Returns the default value. In case of empty list return
null.- Returns:
Returns the default value.
-
-