Package jadex.web.examples.puzzle
Class HighscoreEntry
- java.lang.Object
-
- jadex.web.examples.puzzle.HighscoreEntry
-
- All Implemented Interfaces:
java.lang.Comparable<HighscoreEntry>
public class HighscoreEntry extends java.lang.Object implements java.lang.Comparable<HighscoreEntry>
Store a single highscore entry.
-
-
Field Summary
Fields Modifier and Type Field Description protected intboardsizeThe board size.protected java.util.DatedateThe date.protected inthint_countThe number of hints used.protected java.lang.StringnameThe name of the player.
-
Constructor Summary
Constructors Constructor Description HighscoreEntry()Create an empty highscore entry.HighscoreEntry(java.lang.String name, int boardsize, int hint_count)Create a new highscore entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(HighscoreEntry entry)Compare two highscore entries.booleanequals(java.lang.Object o)Test for equality.intgetBoardSize()Get the boardsize of this HighscoreEntry.java.util.DategetDate()Get the date of this HighscoreEntry.intgetHintCount()Get the hint_count of this HighscoreEntry.java.lang.StringgetName()Get the name of this HighscoreEntry.inthashCode()Generate a hashcode for this entry.voidsetBoardSize(int boardsize)Set the boardsize of this HighscoreEntry.voidsetDate(java.util.Date date)Set the date of this HighscoreEntry.voidsetHintCount(int hint_count)Set the hint_count of this HighscoreEntry.voidsetName(java.lang.String name)Set the name of this HighscoreEntry.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of this HighscoreEntry.- Returns:
- Returns the name.
-
setName
public void setName(java.lang.String name)
Set the name of this HighscoreEntry.- Parameters:
name- The name to set.
-
getBoardSize
public int getBoardSize()
Get the boardsize of this HighscoreEntry.- Returns:
- Returns the boardsize.
-
setBoardSize
public void setBoardSize(int boardsize)
Set the boardsize of this HighscoreEntry.- Parameters:
boardsize- The boardsize to set.
-
getHintCount
public int getHintCount()
Get the hint_count of this HighscoreEntry.- Returns:
- Returns the hint_count.
-
setHintCount
public void setHintCount(int hint_count)
Set the hint_count of this HighscoreEntry.- Parameters:
hint_count- The hint_count to set.
-
getDate
public java.util.Date getDate()
Get the date of this HighscoreEntry.- Returns:
- Returns the date.
-
setDate
public void setDate(java.util.Date date)
Set the date of this HighscoreEntry.- Parameters:
date- The date to set.
-
compareTo
public int compareTo(HighscoreEntry entry)
Compare two highscore entries.- Specified by:
compareToin interfacejava.lang.Comparable<HighscoreEntry>
-
hashCode
public int hashCode()
Generate a hashcode for this entry.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Test for equality.- Overrides:
equalsin classjava.lang.Object
-
-