public class PeriodScoreImpl extends Object implements PeriodScore
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 and Description |
---|
PeriodScoreImpl(PeriodScoreDto ps,
LocalizedNamedValueCache matchStatuses)
Initializes a new instance of
PeriodScoreImpl |
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getAwayScore()
Returns the score of the away team in the period represented by the current instance
|
BigDecimal |
getHomeScore()
Returns the score of the home team in the period represented by the current instance
|
Integer |
getMatchStatusCode()
Returns the match status code
|
LocalizedNamedValue |
getPeriodDescription()
Returns the period description translated in the default locale
|
LocalizedNamedValue |
getPeriodDescription(Locale locale)
Returns the period description translated in the specified language
|
Integer |
getPeriodNumber()
Returns the sequence number of the period represented by the current instance
|
PeriodType |
getPeriodType()
Returns the period type
|
String |
toString()
Returns a
String describing the current PeriodScore instance |
public PeriodScoreImpl(PeriodScoreDto ps, LocalizedNamedValueCache matchStatuses)
PeriodScoreImpl
ps
- the DTO which is used to construct the instancematchStatuses
- the named value cache used to extract period descriptionspublic BigDecimal getHomeScore()
getHomeScore
in interface PeriodScore
public BigDecimal getAwayScore()
getAwayScore
in interface PeriodScore
public Integer getPeriodNumber()
getPeriodNumber
in interface PeriodScore
public LocalizedNamedValue getPeriodDescription()
getPeriodDescription
in interface PeriodScore
public LocalizedNamedValue getPeriodDescription(Locale locale)
getPeriodDescription
in interface PeriodScore
locale
- - a Locale
specifying the language of the statuspublic PeriodType getPeriodType()
getPeriodType
in interface PeriodScore
public Integer getMatchStatusCode()
getMatchStatusCode
in interface PeriodScore
public String toString()
String
describing the current PeriodScore
instancetoString
in class Object
String
describing the current PeriodScore
instanceCopyright © 2016–2025. All rights reserved.