celeboss.data
Class MiniLeague

java.lang.Object
  extended byceleboss.data.MiniLeague
All Implemented Interfaces:
Monitorable, java.io.Serializable

public class MiniLeague
extends java.lang.Object
implements Monitorable, java.io.Serializable

This class represents a single mini league in the Celebdaq. It consists of a number of league members.

Version:
1.0
Author:
bevans
See Also:
Serialized Form

Field Summary
static java.lang.String MEMBERS
          Property name for the Members
static java.lang.String NAME
          Property name for the League name
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a listener to changes to this league
 int getBestPosition()
           
 int getLastPosition()
           
 java.lang.Integer getLeagueId()
          Get the league identifier.
 java.util.List getMembers()
          Get a list of members.
 java.lang.String getName()
          Get the name of this league
 int getPosition()
           
 float getWeeklyGain()
           
 boolean hasMembers(int[] accounts)
          This method checks that at least one of the specified auser accounts are members of this mini-league.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a listener to changes to this league
 void setBestPosition(int bestPosition)
           
 void setLastPosition(int lastPosition)
           
 void setMembers(java.util.List list)
          Ordered list of members
 void setName(java.lang.String newName)
          Update the name of this mini league
 void setPosition(int position)
           
 void setWeeklyGain(float weeklyGain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEMBERS

public static final java.lang.String MEMBERS
Property name for the Members

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Property name for the League name

See Also:
Constant Field Values
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a listener to changes to this league

Specified by:
addPropertyChangeListener in interface Monitorable
Parameters:
listener - New listener to add

getBestPosition

public int getBestPosition()
Returns:
Returns the bestPosition.

getLastPosition

public int getLastPosition()
Returns:
Returns the lastPosition.

getLeagueId

public java.lang.Integer getLeagueId()
Get the league identifier.

Returns:
Integer.

getMembers

public java.util.List getMembers()
Get a list of members.

Returns:
Ordered list of LeagueMember instances

getName

public java.lang.String getName()
Get the name of this league

Returns:
Current name

getPosition

public int getPosition()
Returns:
Returns the position.

getWeeklyGain

public float getWeeklyGain()
Returns:
Returns the weeklyGain.

hasMembers

public boolean hasMembers(int[] accounts)
This method checks that at least one of the specified auser accounts are members of this mini-league.

Parameters:
accounts - Array of valid account ids
Returns:
True is at least one is present

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a listener to changes to this league

Specified by:
removePropertyChangeListener in interface Monitorable
Parameters:
listener - New listener to add

setBestPosition

public void setBestPosition(int bestPosition)
Parameters:
bestPosition - The bestPosition to set.

setLastPosition

public void setLastPosition(int lastPosition)
Parameters:
lastPosition - The lastPosition to set.

setMembers

public void setMembers(java.util.List list)
Ordered list of members

Parameters:
list - The new member list

setName

public void setName(java.lang.String newName)
Update the name of this mini league

Parameters:
newName - New name

setPosition

public void setPosition(int position)
Parameters:
position - The position to set.

setWeeklyGain

public void setWeeklyGain(float weeklyGain)
Parameters:
weeklyGain - The weeklyGain to set.