java.lang.Object | +--CardSuit
Suit.java - An object that represents the suit of a playing card. This object is immutable, once it is created there is no way to change it - i.e. there are no mutator methods in this class. This class is adapted from the text.
| Field Summary | |
static char |
CLUBS
Representation of the clubs suit. |
static char |
DIAMONDS
Representation of the diamonds suit. |
static char |
HEARTS
Representation of the hearts suit. |
static char |
SPADES
Representation of the spades suit. |
| Constructor Summary | |
(package private) |
CardSuit(char initSuit)
Constructor that initializes the suit of the object being created. |
| Method Summary | |
char |
getSuit()
Get the suit of the calling object. |
java.lang.String |
toString()
Return a string representation of the suit. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final char CLUBS
public static final char DIAMONDS
public static final char HEARTS
public static final char SPADES
| Constructor Detail |
CardSuit(char initSuit)
initSuit - the suit of the card.| Method Detail |
public char getSuit()
public java.lang.String toString()