|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object p2Util.Suit
public class Suit
The Suit class defines each of the 4 suits of a standard deck of playing cards. Using this class assures that all code refers to the suits in the same manner i.e Suit.CLUBS, Suit.DIAMONDS, Suit.HEARTS, and Suit.SPADES with no possibility of conflicting representations
Class Invariant:
The Suit's symbol is a single alphabetic character
The Suit's name is a non-empty string
Suit objects are immutable and unique
Method Summary | |
---|---|
static Suit[] |
VALUES()
VALUES A method to return all suits Suits are returned in alphabetical order Clubs, Diamonds, Hearts, Spades |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Suit[] VALUES()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |