java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.entities.PlayerProfileImpl
All Implemented Interfaces:
Player, PlayerProfile
Direct Known Subclasses:
CompetitorPlayerImpl

public class PlayerProfileImpl extends Object implements PlayerProfile
Represents player's profile information
  • Constructor Details

    • PlayerProfileImpl

      public PlayerProfileImpl(Urn playerId, ProfileCache profileCache, List<Urn> possibleAssociatedCompetitorIds, List<Locale> locales, ExceptionHandlingStrategy exceptionHandlingStrategy)
      Initializes a new instance of PlayerProfileImpl
      Parameters:
      playerId - the associated player identifier
      profileCache - the cache used to provide the data
      possibleAssociatedCompetitorIds - a list of possible associated competitor ids (used to prefetch data)
      locales - the Locales in which the data should be available
      exceptionHandlingStrategy - the preferred exception handling strategy
  • Method Details

    • getId

      public Urn getId()
      Returns the unique Urn identifier representing the current PlayerProfile instance
      Specified by:
      getId in interface Player
      Returns:
      - the unique Urn identifier representing the current PlayerProfile instance
    • getNames

      public Map<Locale,String> getNames()
      Returns an unmodifiable map of available translated names
      Specified by:
      getNames in interface Player
      Returns:
      - an unmodifiable map of available translated names
    • getName

      public String getName(Locale locale)
      Returns the name of the player in the specified language
      Specified by:
      getName in interface Player
      Parameters:
      locale - - a Locale specifying the language of the returned name
      Returns:
      - the name of the player in the specified language
    • getFullName

      public String getFullName(Locale locale)
      Returns the player full name in the specified language
      Specified by:
      getFullName in interface PlayerProfile
      Parameters:
      locale - - Locale specifying the language of the returned player name
      Returns:
      - The player full name in the specified language if it exists. Null otherwise.
    • getType

      public String getType()
      Returns the value describing the type(e.g. forward, defense, ...) of the player represented by current instance
      Specified by:
      getType in interface PlayerProfile
      Returns:
      - the value describing the type(e.g. forward, defense, ...) of the player represented by current instance
    • getDateOfBirth

      public Date getDateOfBirth()
      Returns the Date specifying the date of birth of the player associated with the current instance
      Specified by:
      getDateOfBirth in interface PlayerProfile
      Returns:
      - the Date specifying the date of birth of the player associated with the current instance
    • getHeight

      public Integer getHeight()
      Returns the height in centimeters of the player represented by the current instance or a null reference if height is not known
      Specified by:
      getHeight in interface PlayerProfile
      Returns:
      - the height in centimeters of the player represented by the current instance or a null reference if height is not known
    • getWeight

      public Integer getWeight()
      Returns the weight in kilograms of the player represented by the current instance or a null reference if weight is not known
      Specified by:
      getWeight in interface PlayerProfile
      Returns:
      - the weight in kilograms of the player represented by the current instance or a null reference if weight is not known
    • getCountryCode

      public String getCountryCode()
      Returns a String representation of a country code
      Specified by:
      getCountryCode in interface PlayerProfile
      Returns:
      - a String representation of a country code
    • getNationality

      public String getNationality(Locale locale)
      Returns the nationality of the player in the requested Locale
      Specified by:
      getNationality in interface PlayerProfile
      Parameters:
      locale - - the Locale in which to return the nationality
      Returns:
      - the nationality of the player in the requested Locale
    • getNationalities

      public Map<Locale,String> getNationalities()
      Returns an unmodifiable Map containing player's nationality in different languages
      Specified by:
      getNationalities in interface PlayerProfile
      Returns:
      - an unmodifiable Map containing player's nationality in different languages
      See Also:
      • ImmutableMap
    • getJerseyNumber

      public Integer getJerseyNumber()
      Returns the player jersey number
      Specified by:
      getJerseyNumber in interface PlayerProfile
      Returns:
      the jersey number if available; otherwise null
    • getNickname

      public String getNickname()
      Returns the player nickname
      Specified by:
      getNickname in interface PlayerProfile
      Returns:
      the player nickname if available; otherwise null
    • getGender

      public String getGender()
      Returns gender of the player
      Specified by:
      getGender in interface PlayerProfile
      Returns:
      the gender of the player if available; otherwise null
    • toString

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