public class TennisStats extends java.lang.Object implements IParticipantStats
Constructor and Description |
---|
TennisStats(int setScore,
int gameScore,
int point,
int isAv,
int firstSetGames,
int secondSetGames,
int thirdSetGames,
int forthSetGames,
int fifthSetGames,
ScoreType scoreType) |
TennisStats(java.util.List<java.lang.Integer> scoreList) |
Modifier and Type | Method and Description |
---|---|
boolean |
getAv()
Return true when the player wins the first point from a deuce and needs
one more point to win the game, else return false
|
int |
getCurrentGameWon()
Retrieve game score of current set
|
int |
getCurrentPointWon()
Retrieve point of current game
|
int |
getCurrentSetWon()
Retrieve set score
|
int |
getGameWon(int setNum)
Retrieve first/second/third/fourth set game score.
|
java.util.List<java.lang.Integer> |
getScores()
Retrieve a list of tennis score information.First element is the set
score, followed by game score, point, advantage flag(return by getAv()
API), score type(return by getScoreType() API), game score of first set,
game score of second set, game score of third set, game score of fourth
set, and game score of fifth set.
|
ScoreType |
getScoreType()
To identify the score type of the tennis record.Return GAME_POINT for
normal point, return TIEBREAK_POINT when the set enter tie break.
|
public TennisStats(int setScore, int gameScore, int point, int isAv, int firstSetGames, int secondSetGames, int thirdSetGames, int forthSetGames, int fifthSetGames, ScoreType scoreType)
public TennisStats(java.util.List<java.lang.Integer> scoreList)
public java.util.List<java.lang.Integer> getScores()
getScores
in interface IParticipantStats
public boolean getAv()
public int getCurrentGameWon()
public int getCurrentSetWon()
public int getCurrentPointWon()
public int getGameWon(int setNum)
setNum
- public ScoreType getScoreType()