Public Member Functions | |
Entry (String name, int points) | |
The constructor of an entry simply assigns the local Variables. | |
int | compareTo (Object o) |
Compares itself with the given Entry. | |
Package Attributes | |
String | name |
int | points |
game.Score.Entry.Entry | ( | String | name, | |
int | points | |||
) |
int game.Score.Entry.compareTo | ( | Object | o | ) |
Compares itself with the given Entry.
o | An instance of Entry else it will post a Warning to the console. |
References game.Score.Entry.points.
Referenced by game.Score.EntryComparator.compare().
00126 { 00127 if (o instanceof Entry) { 00128 Entry entry = (Entry) o; 00129 return (points - entry.points); 00130 } 00131 System.out.println("compare error: " + this.getClass()); 00132 return 0; 00133 }
String game.Score.Entry.name [package] |
Referenced by game.Score.SaveHighScore().
int game.Score.Entry.points [package] |
Referenced by game.Score.Entry.compareTo(), and game.Score.SaveHighScore().