Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dma.ihm.game.team
Class TeamStats  view TeamStats download TeamStats.java

java.lang.Object
  extended byorg.dma.ihm.lib.CustomComparator
      extended byorg.dma.ihm.game.team.TeamStats
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class TeamStats
extends org.dma.ihm.lib.CustomComparator
implements java.lang.Cloneable

Team stats with heavy metal compareTo(o) overriding


Field Summary
private  int gamesLost
          Games lost
private  int gamesPlayed
          Games played
private  int gamesTied
          Games tied
private  int gamesWon
          Games won
private  int goalsAgainst
          Goals against
private  int goalsFor
          Goals for
private  java.lang.Object owner
          Owner of this stats
private  int penaltyMinutes
          Penalty minutes
private  int points
          Points
static int SORT_GAMES_LOST
          Sort by games lost
static int SORT_GAMES_PLAYED
          Sort by games played
static int SORT_GAMES_TIED
          Sort by games tied
static int SORT_GAMES_WON
          Sort by games won
static int SORT_GOALS_AGAINST
          Sort by goals against
static int SORT_GOALS_DIFFERENCE
          Sort by gaol difference
static int SORT_GOALS_FOR
          Sort by goals for
static int SORT_PENALTY_MINUTES
          Sort by penalty minutes
static int SORT_POINTS
          Sort by points (special)
private  Team team
          Team of this stats
 
Fields inherited from class org.dma.ihm.lib.CustomComparator
ascending, sortCriteria
 
Constructor Summary
TeamStats(Team team, java.lang.Object owner)
          Constructs new teamStats for a owner
 
Method Summary
 void addGameLost(int lost)
          Add lost games to teamStats
 void addGamesPlayed(int played)
          Add played games to teamStats
 void addGameTied(int ties)
          Add tied games to teamStats
 void addGameWon(int wins)
          Add won games to teamStats
 void addGoalsAgainst(int goalsAgainst)
          Add goals Against to teamStats
 void addGoalsFor(int goalsFor)
          Add goals to teamStats
 void addPenaltyMinutes(int penaltyMinutes)
          Add penalty minutes to teamStats
 void addPoints(int points)
          Add points to teamStats
 java.lang.Object clone()
          Provice clone() to this class
 int compareTo(java.lang.Object o)
          Override compareTo(Object o) for the points sorting
 int getGamesLost()
          Returns games lost
 int getGamesPlayed()
          Returns games played
 int getGamesTied()
          Returns games tied
 int getGamesWon()
          Returns games won
 int getGoalsAgainst()
          Returns goals against
 int getGoalsDiff()
          Returns goal difference
 int getGoalsFor()
          Returns goals scored
 java.lang.Object getOwner()
          Returns owner of this stats
 int getPenaltyMinutes()
          Returns penalty minutes
 int getPoints()
          Returns points
protected  int getSortValue()
          Returns sort value considering sortCriteria
 Team getTeam()
          Returns owner of this stast
 
Methods inherited from class org.dma.ihm.lib.CustomComparator
setSortCriteria, setSortOrder
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SORT_GOALS_FOR

public static final int SORT_GOALS_FOR
Sort by goals for

See Also:
Constant Field Values

SORT_GOALS_AGAINST

public static final int SORT_GOALS_AGAINST
Sort by goals against

See Also:
Constant Field Values

SORT_GAMES_PLAYED

public static final int SORT_GAMES_PLAYED
Sort by games played

See Also:
Constant Field Values

SORT_GAMES_WON

public static final int SORT_GAMES_WON
Sort by games won

See Also:
Constant Field Values

SORT_GAMES_TIED

public static final int SORT_GAMES_TIED
Sort by games tied

See Also:
Constant Field Values

SORT_GAMES_LOST

public static final int SORT_GAMES_LOST
Sort by games lost

See Also:
Constant Field Values

SORT_POINTS

public static final int SORT_POINTS
Sort by points (special)

See Also:
Constant Field Values

SORT_GOALS_DIFFERENCE

public static final int SORT_GOALS_DIFFERENCE
Sort by gaol difference

See Also:
Constant Field Values

SORT_PENALTY_MINUTES

public static final int SORT_PENALTY_MINUTES
Sort by penalty minutes

See Also:
Constant Field Values

goalsFor

private int goalsFor
Goals for


goalsAgainst

private int goalsAgainst
Goals against


gamesPlayed

private int gamesPlayed
Games played


gamesWon

private int gamesWon
Games won


gamesTied

private int gamesTied
Games tied


gamesLost

private int gamesLost
Games lost


points

private int points
Points


penaltyMinutes

private int penaltyMinutes
Penalty minutes


team

private Team team
Team of this stats


owner

private java.lang.Object owner
Owner of this stats

Constructor Detail

TeamStats

public TeamStats(Team team,
                 java.lang.Object owner)
Constructs new teamStats for a owner

Method Detail

addGoalsFor

public void addGoalsFor(int goalsFor)
Add goals to teamStats


addGoalsAgainst

public void addGoalsAgainst(int goalsAgainst)
Add goals Against to teamStats


addPoints

public void addPoints(int points)
Add points to teamStats


addGameWon

public void addGameWon(int wins)
Add won games to teamStats


addGameLost

public void addGameLost(int lost)
Add lost games to teamStats


addGameTied

public void addGameTied(int ties)
Add tied games to teamStats


addGamesPlayed

public void addGamesPlayed(int played)
Add played games to teamStats


addPenaltyMinutes

public void addPenaltyMinutes(int penaltyMinutes)
Add penalty minutes to teamStats


getGoalsFor

public int getGoalsFor()
Returns goals scored


getGoalsAgainst

public int getGoalsAgainst()
Returns goals against


getGoalsDiff

public int getGoalsDiff()
Returns goal difference


getPoints

public int getPoints()
Returns points


getGamesPlayed

public int getGamesPlayed()
Returns games played


getGamesWon

public int getGamesWon()
Returns games won


getGamesTied

public int getGamesTied()
Returns games tied


getGamesLost

public int getGamesLost()
Returns games lost


getPenaltyMinutes

public int getPenaltyMinutes()
Returns penalty minutes


getTeam

public Team getTeam()
Returns owner of this stast


getOwner

public java.lang.Object getOwner()
Returns owner of this stats


getSortValue

protected int getSortValue()
Returns sort value considering sortCriteria


compareTo

public int compareTo(java.lang.Object o)
Override compareTo(Object o) for the points sorting

Specified by:
compareTo in interface java.lang.Comparable

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Provice clone() to this class