common
Class Hand

java.lang.Object
  extended by common.Hand
All Implemented Interfaces:
java.io.Serializable

public class Hand
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int DONE
          Indicates that the status of this hand as done playing.
static int PLAYING
          Indicates that the status of this hand is playing.
 
Constructor Summary
Hand(int maxDelt)
          Constructs a Hand object which is a Vector of Card objects that can hold at most maxDelt cards.
 
Method Summary
 void addCard(Card c)
          Adds a Card object to the hand at the end of the Hand.
 void addCard(Card[] c)
          Adds an array of Card objects to this hand.
 void clearHand()
          Removes all the cards from a hand.
 boolean contains(Card c)
          Returns true if this card is in the hand, false otherwise.
 java.util.Vector<java.lang.Integer> getBlackjackValues()
          Returns an Vector of possible values that a blackjack hand can be.
 int getCardCount()
          Return the number of cards in the hand.
 int getStatus()
          Gets the play status of the Client of this Hand.
 void removeCard(Card c)
          Removes the specified card from the hand.
 void removeCardAt(int position)
          Removes the card at the specified position from the hand.
 void setStatus(int s)
          Sets the playing status of the Client of this Hand.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAYING

public static final int PLAYING
Indicates that the status of this hand is playing.

See Also:
Constant Field Values

DONE

public static final int DONE
Indicates that the status of this hand as done playing.

See Also:
Constant Field Values
Constructor Detail

Hand

public Hand(int maxDelt)
Constructs a Hand object which is a Vector of Card objects that can hold at most maxDelt cards.

Parameters:
maxDelt - int
Method Detail

clearHand

public void clearHand()
Removes all the cards from a hand.


addCard

public void addCard(Card c)
Adds a Card object to the hand at the end of the Hand.

Parameters:
c - Card that is being added to the hand.

addCard

public void addCard(Card[] c)
Adds an array of Card objects to this hand.

Parameters:
c - Card[]

removeCard

public void removeCard(Card c)
Removes the specified card from the hand.

Parameters:
c - Card that is removed from the hand.

removeCardAt

public void removeCardAt(int position)
Removes the card at the specified position from the hand.

Parameters:
position - int the position from which the card is to be removed.

getCardCount

public int getCardCount()
Return the number of cards in the hand.

Returns:
int

getStatus

public int getStatus()
Gets the play status of the Client of this Hand.

Returns:
int

contains

public boolean contains(Card c)
Returns true if this card is in the hand, false otherwise.

Parameters:
c - Card that you're looking for.
Returns:
boolean

setStatus

public void setStatus(int s)
Sets the playing status of the Client of this Hand.

Parameters:
s - int

getBlackjackValues

public java.util.Vector<java.lang.Integer> getBlackjackValues()
Returns an Vector of possible values that a blackjack hand can be.

Returns:
Vector