Class PeriodScoreImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.entities.PeriodScoreImpl
- All Implemented Interfaces:
PeriodScore
Represents a score status of a sport event period
the
PeriodScoreImpl represents a description of the score status in a specific match,
as an example for a soccer game:
homeScore:1
awayScore:0
number:2 (as in 2nd half time)-
Constructor Summary
ConstructorsConstructorDescriptionPeriodScoreImpl(PeriodScoreDto ps, LocalizedNamedValueCache matchStatuses) Initializes a new instance ofPeriodScoreImpl -
Method Summary
Modifier and TypeMethodDescriptionReturns the score of the away team in the period represented by the current instanceReturns the score of the home team in the period represented by the current instanceReturns the match status codeReturns the period description translated in the default localegetPeriodDescription(Locale locale) Returns the period description translated in the specified languageReturns the sequence number of the period represented by the current instanceReturns the period typetoString()Returns aStringdescribing the currentPeriodScoreinstance
-
Constructor Details
-
PeriodScoreImpl
Initializes a new instance ofPeriodScoreImpl- Parameters:
ps- the DTO which is used to construct the instancematchStatuses- the named value cache used to extract period descriptions
-
-
Method Details
-
getHomeScore
Returns the score of the home team in the period represented by the current instance- Specified by:
getHomeScorein interfacePeriodScore- Returns:
- - the score of the home team in the period represented by the current instance
-
getAwayScore
Returns the score of the away team in the period represented by the current instance- Specified by:
getAwayScorein interfacePeriodScore- Returns:
- - the score of the away team in the period represented by the current instance
-
getPeriodNumber
Returns the sequence number of the period represented by the current instance- Specified by:
getPeriodNumberin interfacePeriodScore- Returns:
- - the sequence number of the period represented by the current instance
-
getPeriodDescription
Returns the period description translated in the default locale- Specified by:
getPeriodDescriptionin interfacePeriodScore- Returns:
- - the period description translated in the default locale
-
getPeriodDescription
Returns the period description translated in the specified language- Specified by:
getPeriodDescriptionin interfacePeriodScore- Parameters:
locale- - aLocalespecifying the language of the status- Returns:
- - period description translated in the specified language
-
getPeriodType
Returns the period type- Specified by:
getPeriodTypein interfacePeriodScore- Returns:
- the period type
-
getMatchStatusCode
Returns the match status code- Specified by:
getMatchStatusCodein interfacePeriodScore- Returns:
- - the match status code
-
toString
Returns aStringdescribing the currentPeriodScoreinstance- Overrides:
toStringin classObject- Returns:
- - a
Stringdescribing the currentPeriodScoreinstance
-