Holger's
Java API

com.antelmann.game
Class HighscoreEntry

java.lang.Object
  extended by com.antelmann.game.HighscoreEntry
All Implemented Interfaces:
Serializable, Comparable<HighscoreEntry>

public class HighscoreEntry
extends Object
implements Serializable, Comparable<HighscoreEntry>

Author:
Holger Antelmann
See Also:
Serialized Form

Constructor Summary
HighscoreEntry(double score, String user, long time)
           
 
Method Summary
 int compareTo(HighscoreEntry entry)
           
 boolean equals(Object obj)
          based on time, user
 double getScore()
           
 long getTime()
           
 String getUser()
           
 int hashCode()
           
 String toString()
          returns the score, the user and the time as a readable String
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HighscoreEntry

public HighscoreEntry(double score,
                      String user,
                      long time)
               throws NullPointerException
Throws:
NullPointerException
Method Detail

compareTo

public int compareTo(HighscoreEntry entry)
Specified by:
compareTo in interface Comparable<HighscoreEntry>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
based on time, user

Overrides:
equals in class Object

toString

public String toString()
returns the score, the user and the time as a readable String

Overrides:
toString in class Object

getUser

public String getUser()

getScore

public double getScore()

getTime

public long getTime()


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads