|
|||||||||
| Home >> All >> org >> dma >> ihm >> game >> [ league overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dma.ihm.game.league
Class League

java.lang.Objectorg.dma.ihm.game.league.League
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public abstract class League
- extends java.lang.Object
- implements java.lang.Comparable, java.io.Serializable
- extends java.lang.Object
League Is owner of a list of teams within this league. - Gets the teams trough constructor params. - Provides some help functions that are needed in every league. (i.e to replace a team with another, or lookup functions for teams) - Implements the Comparable interface for sorting leagues in an owner.
| Field Summary | |
protected LeagueOwner |
leagueOwner
Pointer to the owner of this league |
protected java.lang.String |
name
Name of this league |
protected int |
rank
Rank of this league (within an owner) |
protected org.dma.ihm.game.team.Team[] |
teams
Array of the teams in this league |
| Constructor Summary | |
League(java.lang.String name,
int rank,
org.dma.ihm.game.team.Team[] teams)
Constructor with leaguename, ranking in owner and the teams |
|
| Method Summary | |
int |
compareTo(java.lang.Object o)
Implementation of the compareTo function to sort the leagues |
java.lang.String |
getDescription()
Returns complete description of this element (owner, league, name) |
abstract java.util.Vector |
getLeagueElementGroups()
Returns all LeagueElementGroups |
abstract java.util.Vector |
getLeagueElements()
Returns all Standings (Playoffs or Tables) |
LeagueOwner |
getLeagueOwner()
Returns it's owner |
java.lang.String |
getName()
Returns name of this league |
org.dma.ihm.game.player.Player[] |
getPlayers()
Returns all players of this league |
org.dma.ihm.game.player.PlayerStats[] |
getPlayerStats()
Gets the playerStats attribute of the League object |
int |
getRank()
Gets the rank attribute of the League object |
int |
getSortValue()
Small helper for the Comparable interface |
org.dma.ihm.game.team.Team[] |
getTeams()
Returns all teams of this league |
org.dma.ihm.game.team.TeamStats[] |
getTeamStats()
Gets the teamStats attribute of the League object |
boolean |
isTeamOfLeague(org.dma.ihm.game.team.Team team)
Lookup function to search a team within this league |
abstract void |
newSeason()
Resets all teams (new Season) |
boolean |
replaceTeam(org.dma.ihm.game.team.Team oldTeam,
org.dma.ihm.game.team.Team newTeam)
Replaces oldTeam with newTeam. |
void |
setLeagueOwner(LeagueOwner leagueOwner)
Sets the owner of this league (called by LeagueOwner) |
java.lang.String |
toString()
Overrides the toString method with something more usefull |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
teams
protected org.dma.ihm.game.team.Team[] teams
- Array of the teams in this league
name
protected java.lang.String name
- Name of this league
rank
protected int rank
- Rank of this league (within an owner)
leagueOwner
protected LeagueOwner leagueOwner
- Pointer to the owner of this league
| Constructor Detail |
League
public League(java.lang.String name, int rank, org.dma.ihm.game.team.Team[] teams)
- Constructor with leaguename, ranking in owner and the teams
| Method Detail |
newSeason
public abstract void newSeason()
- Resets all teams (new Season)
setLeagueOwner
public void setLeagueOwner(LeagueOwner leagueOwner)
- Sets the owner of this league (called by LeagueOwner)
getLeagueOwner
public LeagueOwner getLeagueOwner()
- Returns it's owner
getName
public java.lang.String getName()
- Returns name of this league
getDescription
public java.lang.String getDescription()
- Returns complete description of this element (owner, league, name)
getTeams
public org.dma.ihm.game.team.Team[] getTeams()
- Returns all teams of this league
getTeamStats
public org.dma.ihm.game.team.TeamStats[] getTeamStats()
- Gets the teamStats attribute of the League object
getPlayerStats
public org.dma.ihm.game.player.PlayerStats[] getPlayerStats()
- Gets the playerStats attribute of the League object
getPlayers
public org.dma.ihm.game.player.Player[] getPlayers()
- Returns all players of this league
isTeamOfLeague
public boolean isTeamOfLeague(org.dma.ihm.game.team.Team team)
- Lookup function to search a team within this league
replaceTeam
public boolean replaceTeam(org.dma.ihm.game.team.Team oldTeam, org.dma.ihm.game.team.Team newTeam)
- Replaces oldTeam with newTeam. Returns true if team was replace, false if
the oldTeam wasn't found
getLeagueElements
public abstract java.util.Vector getLeagueElements()
- Returns all Standings (Playoffs or Tables)
getLeagueElementGroups
public abstract java.util.Vector getLeagueElementGroups()
- Returns all LeagueElementGroups
getSortValue
public int getSortValue()
- Small helper for the Comparable interface
getRank
public int getRank()
- Gets the rank attribute of the League object
compareTo
public int compareTo(java.lang.Object o)
- Implementation of the compareTo function to sort the leagues
- Specified by:
compareToin interfacejava.lang.Comparable
toString
public java.lang.String toString()
- Overrides the toString method with something more usefull
|
|||||||||
| Home >> All >> org >> dma >> ihm >> game >> [ league overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.dma.ihm.game.league.League