|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.javaflair.pokerprophesier.api.card.Card
public class Card
A representation of a playing card.
| Field Summary | |
|---|---|
static int |
ACE
Rank: ace |
static int |
CLUBS
Suit: clubs |
static int |
DIAMONDS
Suit: diamonds |
static int |
EIGHT
Rank: eight |
static int |
FIVE
Rank: five |
static int |
FOUR
Rank: four |
static int |
HEARTS
Suit: hearts |
static int |
JACK
Rank: jack |
static int |
KING
Rank: king |
static int |
NINE
Rank: nine |
static int |
QUEEN
Rank: queen |
static int |
SEVEN
Rank: seven |
static int |
SIX
Rank: six |
static int |
SPADES
Suit: spades |
static int |
TEN
Rank: ten |
static int |
THREE
Rank: three |
static int |
TWO
Rank: two |
| Constructor Summary | |
|---|---|
Card(int rank,
int suit)
Constructs a card with the specified rank and suit. |
|
Card(int rank,
int suit,
boolean isHoleCard)
Constructs a card with the specified rank, suit and boolean flag which indicates whether the card is a hole card. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object obj)
Performs a comparison based on rank. |
boolean |
equals(Object obj)
|
int |
getRank()
Returns the card's rank. |
int |
getSuit()
Returns the card's suit. |
int |
hashCode()
|
boolean |
isHoleCard()
Returns a boolean indicating whether the card is a hole card. |
void |
setHoleCard(boolean isHoleCard)
Sets the hole card flag. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TWO
public static final int THREE
public static final int FOUR
public static final int FIVE
public static final int SIX
public static final int SEVEN
public static final int EIGHT
public static final int NINE
public static final int TEN
public static final int JACK
public static final int QUEEN
public static final int KING
public static final int ACE
public static final int HEARTS
public static final int DIAMONDS
public static final int SPADES
public static final int CLUBS
| Constructor Detail |
|---|
public Card(int rank,
int suit)
rank - the ranksuit - the suit
public Card(int rank,
int suit,
boolean isHoleCard)
rank - the ranksuit - the suitisHoleCard - the hole card flag| Method Detail |
|---|
public int getRank()
public int getSuit()
public void setHoleCard(boolean isHoleCard)
isHoleCard - the flagpublic boolean isHoleCard()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparableobj - the object to compare to
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||