public class Card2 extends java.lang.Object implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
ACE |
static int |
CLUBS |
static int |
DIAMONDS |
static int |
HEARTS |
static int |
KING |
static int |
SPADES |
static int |
UNASSIGNED |
Constructor and Description |
---|
Card2(int number,
int suit) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getNumber() |
int |
getSuit() |
int |
hashCode() |
static boolean |
isValidNumber(int number) |
static boolean |
isValidSuit(int suit) |
static java.lang.String |
numberToString(int number) |
static java.lang.String |
suitToString(int suit) |
java.lang.String |
toString() |
public static final int UNASSIGNED
public static final int DIAMONDS
public static final int CLUBS
public static final int HEARTS
public static final int SPADES
public static final int ACE
public static final int KING
public Card2(int number, int suit)
public int getSuit()
public int getNumber()
public static boolean isValidNumber(int number)
public static boolean isValidSuit(int suit)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String numberToString(int number)
public static java.lang.String suitToString(int suit)