com.javaflair.pokerprophesier.api.card
Class HoleCards

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

public class HoleCards
extends Object

A representation of a pair of hole cards.

Author:
Javaflair
See Also:
Card

Constructor Summary
HoleCards(Card firstCard, Card secondCard)
          Create a HoleCards instance with the specified hole cards.
 
Method Summary
 boolean equals(Object obj)
           
 Card[] getCards()
          Returns both hole cards.
 Card getFirstCard()
          Returns the first hole card.
 int getFirstRank()
          Returns the rank of the first hole card.
 Card getSecondCard()
          Returns the second hole card.
 int getSecondRank()
          Returns the rank of the second hole card.
 int hashCode()
           
 boolean isFolded()
          Returns a boolean indicating whether the hole cards are folded.
 boolean isSuited()
          Returns a boolean indicating whether the hole cards are suited (the same suit).
 void setFolded(boolean isFolded)
          Sets whether the hole cards are folded.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HoleCards

public HoleCards(Card firstCard,
                 Card secondCard)
Create a HoleCards instance with the specified hole cards. Both cards can not be null or duplicates of each other.

Parameters:
firstCard - the first hole card
secondCard - the second hole card
Method Detail

getFirstCard

public Card getFirstCard()
Returns the first hole card.

Returns:
the first hole card

getSecondCard

public Card getSecondCard()
Returns the second hole card.

Returns:
the second hole card

getCards

public Card[] getCards()
Returns both hole cards.

Returns:
the hole cards

getFirstRank

public int getFirstRank()
Returns the rank of the first hole card.

Returns:
the rank

getSecondRank

public int getSecondRank()
Returns the rank of the second hole card.

Returns:
the rank

isSuited

public boolean isSuited()
Returns a boolean indicating whether the hole cards are suited (the same suit).

Returns:
true if the hole cards are suited; false if not

isFolded

public boolean isFolded()
Returns a boolean indicating whether the hole cards are folded.

Returns:
true if the hole cards are folded; false if not

setFolded

public void setFolded(boolean isFolded)
Sets whether the hole cards are folded.

Parameters:
isFolded - the boolean

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006 Javaflair. All Rights Reserved.