ps0.optional
Class MyHand

java.lang.Object
  extended by ps0.optional.MyHand

public class MyHand
extends Object


Method Summary
Modifier and Type Method and Description
static void main(String[] args)
           
 void printHand_OnlyHearts(Collection<Card> hand)
          Print only the cards in hand that are hearts
 void printHand_RemoveFaceCards(Collection<Card> hand)
          Print only the cards in hand that are number cards AND remove face cards from hand
 void printHand(Collection<Card> hand)
          Print the contents of a hand of cards to the screen.
 void sortLargesttoSmallest()
          Sorts the cards so that any subsequent calls to printHand will print the Hand from the largest to the smallest.
 void sortSmallestToLargest()
          Sorts the cards so that any subsequent calls to printHand will print the Hand from the smallest to the largest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)

printHand

public void printHand(Collection<Card> hand)
Print the contents of a hand of cards to the screen. [Note: one can also System.out.println to print the contents of arrays]


sortSmallestToLargest

public void sortSmallestToLargest()
Sorts the cards so that any subsequent calls to printHand will print the Hand from the smallest to the largest.


sortLargesttoSmallest

public void sortLargesttoSmallest()
Sorts the cards so that any subsequent calls to printHand will print the Hand from the largest to the smallest.


printHand_OnlyHearts

public void printHand_OnlyHearts(Collection<Card> hand)
Print only the cards in hand that are hearts


printHand_RemoveFaceCards

public void printHand_RemoveFaceCards(Collection<Card> hand)
Print only the cards in hand that are number cards AND remove face cards from hand