Class LeaderboardEntry
- java.lang.Object
-
- com.cmput301w23t09.qrhunter.leaderboard.LeaderboardEntry
-
- All Implemented Interfaces:
LeaderboardAdapterItem<LeaderboardEntry>
- Direct Known Subclasses:
PlayerLeaderboardEntry
,QRCodeLeaderboardEntry
public abstract class LeaderboardEntry extends java.lang.Object implements LeaderboardAdapterItem<LeaderboardEntry>
Represents a leaderboard entry
-
-
Constructor Summary
Constructors Constructor Description LeaderboardEntry(int position, java.lang.String name, long score, java.lang.String scoreSuffix)
Constructor for a leaderboard entry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Retrieve the name of the leaderboard entryint
getPosition()
Retrieve the position of the leaderboard entrylong
getScore()
Retrieve the score of the leaderboard entryjava.lang.String
getScoreSuffix()
Retrieve the suffix to use for this leaderboard entryandroid.view.View
getView(android.content.Context context, android.view.View convertView, android.view.ViewGroup parent, LeaderboardEntry item)
Retrieves the view to render in the leaderboard
-
-
-
Constructor Detail
-
LeaderboardEntry
public LeaderboardEntry(int position, java.lang.String name, long score, java.lang.String scoreSuffix)
Constructor for a leaderboard entry- Parameters:
position
- position of the leaderboard entryname
- name of the leaderboard entryscore
- score of the leaderboard entryscoreSuffix
- suffix to use for the leaderboard entry
-
-
Method Detail
-
getName
public java.lang.String getName()
Retrieve the name of the leaderboard entry- Returns:
- name
-
getScore
public long getScore()
Retrieve the score of the leaderboard entry- Returns:
- score
-
getScoreSuffix
public java.lang.String getScoreSuffix()
Retrieve the suffix to use for this leaderboard entry- Returns:
- score suffix
-
getPosition
public int getPosition()
Retrieve the position of the leaderboard entry- Returns:
- position
-
getView
public android.view.View getView(android.content.Context context, android.view.View convertView, android.view.ViewGroup parent, LeaderboardEntry item)
Description copied from interface:LeaderboardAdapterItem
Retrieves the view to render in the leaderboard- Specified by:
getView
in interfaceLeaderboardAdapterItem<LeaderboardEntry>
- Parameters:
context
- application contextconvertView
- viewparent
- parentitem
- leaderboard item- Returns:
- view to display
-
-