java.lang.Object | +--CardSuit
CardSuit.java An object to represent the suit of a playing card.
| Field Summary | |
static boolean |
BLACK
A Black suit. |
static char |
CLUBS
The Clubs suit. |
static char |
DIAMONDS
The Diamonds suit. |
static char |
HEARTS
The Hearts suit. |
static boolean |
RED
A Red suit. |
static char |
SPADES
The Spades suit. |
| Constructor Summary | |
CardSuit(char initSuit)
Construct a CardSuit and initialize the suit. |
|
| Method Summary | |
boolean |
equals(CardSuit compSuit)
Compare the suit of of the invoking object to the suit of compSuit. |
boolean |
getColor()
Return the color of the Suit of the invoking Suit object. |
char |
getSuit()
Return the suit of the CardSuit object. |
java.lang.String |
toString()
Return a String representation of the CardSuit. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final boolean BLACK
public static final char CLUBS
public static final char DIAMONDS
public static final char HEARTS
public static final boolean RED
public static final char SPADES
| Constructor Detail |
public CardSuit(char initSuit)
initSuit - the suit for the CardSuit.| Method Detail |
public boolean equals(CardSuit compSuit)
compSuit - the CardSuit to compare to.public boolean getColor()
public char getSuit()
public java.lang.String toString()
toString in class java.lang.Object