de.palmmedia.yahtzee.data
Class Result

java.lang.Object
  extended by de.palmmedia.yahtzee.data.Result
All Implemented Interfaces:
Comparable<Result>

public class Result
extends Object
implements Comparable<Result>

Represents a game result / highscore.

Author:
Daniel Palme

Field Summary
private  String name
          The name of the player.
private  int score
          The score of the player.
 
Constructor Summary
Result(String name, int score)
          Constructor.
 
Method Summary
 int compareTo(Result another)
          
 String getName()
          Gets the name of the player.
 int getScore()
          Gets the score of the player.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private String name
The name of the player.


score

private int score
The score of the player.

Constructor Detail

Result

public Result(String name,
              int score)
Constructor.

Parameters:
name - The name.
score - The score.
Method Detail

getName

public String getName()
Gets the name of the player.

Returns:
The name.

getScore

public int getScore()
Gets the score of the player.

Returns:
The score.

compareTo

public int compareTo(Result another)

Specified by:
compareTo in interface Comparable<Result>