java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.entities.PeriodScoreImpl
All Implemented Interfaces:
PeriodScore

public class PeriodScoreImpl extends Object implements 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 Details

    • PeriodScoreImpl

      public PeriodScoreImpl(PeriodScoreDto ps, LocalizedNamedValueCache matchStatuses)
      Initializes a new instance of PeriodScoreImpl
      Parameters:
      ps - the DTO which is used to construct the instance
      matchStatuses - the named value cache used to extract period descriptions
  • Method Details

    • getHomeScore

      public BigDecimal getHomeScore()
      Returns the score of the home team in the period represented by the current instance
      Specified by:
      getHomeScore in interface PeriodScore
      Returns:
      - the score of the home team in the period represented by the current instance
    • getAwayScore

      public BigDecimal getAwayScore()
      Returns the score of the away team in the period represented by the current instance
      Specified by:
      getAwayScore in interface PeriodScore
      Returns:
      - the score of the away team in the period represented by the current instance
    • getPeriodNumber

      public Integer getPeriodNumber()
      Returns the sequence number of the period represented by the current instance
      Specified by:
      getPeriodNumber in interface PeriodScore
      Returns:
      - the sequence number of the period represented by the current instance
    • getPeriodDescription

      public LocalizedNamedValue getPeriodDescription()
      Returns the period description translated in the default locale
      Specified by:
      getPeriodDescription in interface PeriodScore
      Returns:
      - the period description translated in the default locale
    • getPeriodDescription

      public LocalizedNamedValue getPeriodDescription(Locale locale)
      Returns the period description translated in the specified language
      Specified by:
      getPeriodDescription in interface PeriodScore
      Parameters:
      locale - - a Locale specifying the language of the status
      Returns:
      - period description translated in the specified language
    • getPeriodType

      public PeriodType getPeriodType()
      Returns the period type
      Specified by:
      getPeriodType in interface PeriodScore
      Returns:
      the period type
    • getMatchStatusCode

      public Integer getMatchStatusCode()
      Returns the match status code
      Specified by:
      getMatchStatusCode in interface PeriodScore
      Returns:
      - the match status code
    • toString

      public String toString()
      Returns a String describing the current PeriodScore instance
      Overrides:
      toString in class Object
      Returns:
      - a String describing the current PeriodScore instance