java.io.Serializable, java.lang.Comparable<GamePlayed>public class GamePlayed extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<GamePlayed>
| Constructor | Description |
|---|---|
GamePlayed(java.lang.String name,
java.util.Date date,
int score) |
Constructor to create a GamePlayed object
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(GamePlayed other) |
Overriden version of compareTo() method for GamePlayed Class
Compares this game score with the specified game score for order.
|
boolean |
equals(java.lang.Object o) |
Overridden version of equals() method for GamePlayed Class
|
java.util.Date |
getDate() |
Getter that returns the date for this GamePlayed instance
|
java.lang.String |
getName() |
Getter that returns the name for this GamePlayed instance
|
int |
getScore() |
Getter that returns the score for this GamePlayed instance
|
java.lang.String |
toString() |
Overridden version of toString() method for GamePlayed Class
|
public GamePlayed(java.lang.String name,
java.util.Date date,
int score)
name - Player's namedate - Date when score was set.score - Player's scorepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(GamePlayed other)
compareTo in interface java.lang.Comparable<GamePlayed>public java.lang.String getName()
public java.util.Date getDate()
public int getScore()