|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp2Util.Rank
public class Rank
The Rank class defines each of the 13 ranks of a standard deck of playing cards. Using this class assures that all code refers to the ranks in the same manner. i.e Rank.ACE, Rank.TWO, ... Rank.QUEEN, Rank.KING with no possibility of conflicting representations.
Class Invariant:
The Rank's symbol is a single alpha-numeric character
The Ranks's name is a non-empty string
14 <= Rank's value <= 2 and unique
Rank objects are immutable and unique
Method Summary | |
---|---|
static Rank[] |
VALUES()
A static method to return all ranks in an array The array contains Ranks in order Ace, 2, 3,...,Queen, King |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Rank[] VALUES()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |