Class LocalizedNamedValueImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.entities.NamedValueImpl
com.sportradar.unifiedodds.sdk.internal.impl.entities.LocalizedNamedValueImpl
- All Implemented Interfaces:
LocalizedNamedValue,NamedValue
An implementation of the
LocalizedNamedValue-
Constructor Summary
ConstructorsConstructorDescriptionLocalizedNamedValueImpl(int id, ConcurrentHashMap<Locale, String> descriptions, Locale defaultLocale) Initializes a new instance ofLocalizedNamedValueImpl -
Method Summary
Modifier and TypeMethodDescriptionReturns the current instance description in the defaultLocalegetDescription(Locale locale) Returns the current instance description in the requestedLocaleMethods inherited from class com.sportradar.unifiedodds.sdk.internal.impl.entities.NamedValueImpl
getIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sportradar.unifiedodds.sdk.entities.NamedValue
getId
-
Constructor Details
-
LocalizedNamedValueImpl
public LocalizedNamedValueImpl(int id, ConcurrentHashMap<Locale, String> descriptions, Locale defaultLocale) Initializes a new instance ofLocalizedNamedValueImpl- Parameters:
id- - the identifierdescriptions- - aConcurrentHashMapcontaining various description translationsdefaultLocale- - theLocalewhich is used as default
-
-
Method Details
-
getDescription
Returns the current instance description in the defaultLocale- Specified by:
getDescriptionin interfaceNamedValue- Overrides:
getDescriptionin classNamedValueImpl- Returns:
- - the current instance description if available; otherwise null
-
getDescription
Returns the current instance description in the requestedLocale- Specified by:
getDescriptionin interfaceLocalizedNamedValue- Parameters:
locale- - theLocalein which the description should be provided- Returns:
- - the current instance description in the requested
Localeif available; otherwise null
-