com.autonomy.utilities
Class LeagueEntry

java.lang.Object
  |
  +--com.autonomy.utilities.LeagueEntry

public class LeagueEntry
extends java.lang.Object

This class represents the unit entry for the League object It contains one named String and its score.


Constructor Summary
LeagueEntry(com.autonomy.utilities.League league, java.lang.String sName, int nScore)
          Constructor.
 
Method Summary
 int compareTo(com.autonomy.utilities.LeagueEntry entry)
          Comparator.
 int compareTo(com.autonomy.utilities.LeagueEntry entry, java.lang.String sSpareKeyName)
          More complex comparator, requires a parent League object.
 java.lang.String getName()
          returns this entries name
 int getScore()
          returns this entries current score
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeagueEntry

public LeagueEntry(com.autonomy.utilities.League league,
                   java.lang.String sName,
                   int nScore)
Constructor.

Parameters:
league - League for which this is a member
sName - name of league entry
nScore - initial score of entry
Method Detail

getName

public java.lang.String getName()
returns this entries name


getScore

public int getScore()
returns this entries current score


compareTo

public int compareTo(com.autonomy.utilities.LeagueEntry entry)
Comparator. First compares scores. If scores are the same, then it compares the names alphabetically


compareTo

public int compareTo(com.autonomy.utilities.LeagueEntry entry,
                     java.lang.String sSpareKeyName)
More complex comparator, requires a parent League object. This first compares scores, and then compares abitrary spare data from the league