public class HighscoreEntry extends java.lang.Object implements java.lang.Comparable<HighscoreEntry>
Modifier and Type | Field and Description |
---|---|
protected int |
boardsize
The board size.
|
protected java.util.Date |
date
The date.
|
protected int |
hint_count
The number of hints used.
|
protected java.lang.String |
name
The name of the player.
|
Constructor and Description |
---|
HighscoreEntry()
Create an empty highscore entry.
|
HighscoreEntry(java.lang.String name,
int boardsize,
int hint_count)
Create a new highscore entry.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HighscoreEntry entry)
Compare two highscore entries.
|
boolean |
equals(java.lang.Object o)
Test for equality.
|
int |
getBoardSize()
Get the boardsize of this HighscoreEntry.
|
java.util.Date |
getDate()
Get the date of this HighscoreEntry.
|
int |
getHintCount()
Get the hint_count of this HighscoreEntry.
|
java.lang.String |
getName()
Get the name of this HighscoreEntry.
|
int |
hashCode()
Generate a hashcode for this entry.
|
void |
setBoardSize(int boardsize)
Set the boardsize of this HighscoreEntry.
|
void |
setDate(java.util.Date date)
Set the date of this HighscoreEntry.
|
void |
setHintCount(int hint_count)
Set the hint_count of this HighscoreEntry.
|
void |
setName(java.lang.String name)
Set the name of this HighscoreEntry.
|
protected java.util.Date date
protected java.lang.String name
protected int boardsize
protected int hint_count
public HighscoreEntry()
public HighscoreEntry(java.lang.String name, int boardsize, int hint_count)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public int getBoardSize()
public void setBoardSize(int boardsize)
boardsize
- The boardsize to set.public int getHintCount()
public void setHintCount(int hint_count)
hint_count
- The hint_count to set.public java.util.Date getDate()
public void setDate(java.util.Date date)
date
- The date to set.public int compareTo(HighscoreEntry entry)
compareTo
in interface java.lang.Comparable<HighscoreEntry>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object