|
-footer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Deck
Abstractly represents a deck of playing cards with a type distribution. The exact number and type of cards contained in the deck is defined by the concrete class that implements this interface.
Any class inmplementing this interface should have a public default no-arg constructor.
| Method Summary | |
|---|---|
java.util.List |
getAllCards()
Returns a nonrandom list of all cards contained in a fresh deck. |
int |
getNumCardsOfType(Card.Color color)
Returns the number of cards in the deck whose color is equal to color. |
int |
getNumCardsOfType(Card.Suit suit)
Returns the number of cards in the deck whose suit is equal to suite. |
int |
getNumCardsOfType(Card.Value value)
Returns the number of cards in the deck whose value is equal to value. |
int |
size()
Returns the total number of cards in the deck. |
| Method Detail |
|---|
java.util.List getAllCards()
CardList of Cardsint size()
int getNumCardsOfType(Card.Color color)
color.
int getNumCardsOfType(Card.Suit suit)
suite.
int getNumCardsOfType(Card.Value value)
value.
|
-footer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||