class CardSet
extends java.lang.Object
| Constructor and Description |
|---|
CardSet(Card... cards)
Create a new CardSet
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Card card)
Check if this CardSet contains a specific card
|
Card |
getCard(int i)
Get a specific card in this CardSet
|
Card[] |
getCards()
Get the cards in this CardSet
|
int |
size()
Get the number of cards in this CardSet
|
java.lang.String |
toString()
Create a string representation of this CardSet
|
private Card[] cards
public CardSet(Card... cards)
cards - The cards in this CardSetpublic java.lang.String toString()
toString in class java.lang.Objectpublic int size()
public boolean contains(Card card)
card - The card to look forpublic Card[] getCards()
public Card getCard(int i)
i - The index of the card to get