p2Util
Class Suit

java.lang.Object
  extended by p2Util.Suit

public class Suit
extends java.lang.Object

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

Author:
Dennis Frey

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

VALUES

public static Suit[] VALUES()
VALUES A method to return all suits
Suits are returned in alphabetical order Clubs, Diamonds, Hearts, Spades

Returns:
an array of Suit objects useful for looping in project 2