com.javaflair.pokerprophesier.api.card
Class CommunityCards

java.lang.Object
  extended by com.javaflair.pokerprophesier.api.card.CommunityCards

public class CommunityCards
extends Object

A represention of a set of community cards, comprised of Cards. A set of community cards can not contain duplicate cards or null cards.

Author:
Javaflair
See Also:
Card

Constructor Summary
CommunityCards()
          Default constructor, which creates an empty set of community cards.
CommunityCards(Card[] cards)
          Creates a set of community cards, using the specified array of cards.
 
Method Summary
 void add(Card card)
          Adds the card to the existing set of community cards.
 Card[] getCards()
          Returns the set of community cards as an array of cards.
 int size()
          Returns the number of community cards.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommunityCards

public CommunityCards()
Default constructor, which creates an empty set of community cards.


CommunityCards

public CommunityCards(Card[] cards)
Creates a set of community cards, using the specified array of cards.

Parameters:
cards - the set of cards
Method Detail

add

public void add(Card card)
Adds the card to the existing set of community cards.

Parameters:
card - the card to add

size

public int size()
Returns the number of community cards.

Returns:
the number of community cards

getCards

public Card[] getCards()
Returns the set of community cards as an array of cards.

Returns:
the array of cards

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006 Javaflair. All Rights Reserved.