|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.ninm.games.cardgames.common.Card
this class represents an arbitrary playing card
| Field Summary | |
protected java.lang.Object |
m_deckID
and ID used to distinguish between different decks |
protected Face |
m_face
the face of this card |
protected Suit |
m_suit
the suit of this card |
| Constructor Summary | |
Card(Face face,
Suit suit)
creates a new card with a null ID |
|
Card(Face face,
Suit suit,
java.lang.Object deckID)
creates a new card with a specified ID |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
compares the members for equality |
java.lang.Object |
getDeckID()
returns the deck ID of this card (i.e. |
Face |
getFace()
returns the face of this card |
Suit |
getSuit()
returns the suit of this card |
int |
hashCode()
the hashcode based on the members |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final Face m_face
protected final java.lang.Object m_deckID
protected final Suit m_suit
| Constructor Detail |
public Card(Face face,
Suit suit)
face - the face of this cardsuit - the suit of this card
public Card(Face face,
Suit suit,
java.lang.Object deckID)
face - the face of this cardsuit - the suit of this carddeckID - the id that distinguishes two cards by the deck they belong to| Method Detail |
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(Object)public Face getFace()
public Suit getSuit()
public java.lang.Object getDeckID()
public java.lang.String toString()
toString in class java.lang.Object
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||