Class LocalizedNamedValueCacheImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.caching.impl.LocalizedNamedValueCacheImpl
- All Implemented Interfaces:
LocalizedNamedValueCache
An implementation of
LocalizedNamedValueCache used to cache LocalizedNamedValue items-
Constructor Summary
ConstructorsConstructorDescriptionLocalizedNamedValueCacheImpl(DataProvider dataProvider, SdkTaskScheduler scheduler, List<Locale> defaultLocales) Initializes a new instance ofLocalizedNamedValueCacheImpl -
Method Summary
Modifier and TypeMethodDescriptionGets aLocalizedNamedValuewith the specified translationsbooleanisValueDefined(int id) Determines if the specified identifier exists in the current instance
-
Constructor Details
-
LocalizedNamedValueCacheImpl
public LocalizedNamedValueCacheImpl(DataProvider dataProvider, SdkTaskScheduler scheduler, List<Locale> defaultLocales) Initializes a new instance ofLocalizedNamedValueCacheImpl- Parameters:
dataProvider- - aDataProviderthat will be used to get new datascheduler- - theSdkTaskSchedulerused to perform repeating cache tasksdefaultLocales- - aListof all supportedLocale
-
-
Method Details
-
get
Gets aLocalizedNamedValuewith the specified translations- Specified by:
getin interfaceLocalizedNamedValueCache- Parameters:
id- - the identifier of the localized valuelocales- - aListofLocalein which the data is required- Returns:
- - a
LocalizedNamedValuewith the specified translations
-
isValueDefined
public boolean isValueDefined(int id) Determines if the specified identifier exists in the current instance- Specified by:
isValueDefinedin interfaceLocalizedNamedValueCache- Parameters:
id- - the identifier to check- Returns:
- -
trueif the value exists; otherwisefalse
-