org.pokersource.enum
Class HandGroup
java.lang.Object
|
+--org.pokersource.enum.HandGroup
- Direct Known Subclasses:
- HoldemHandGroup
- public class HandGroup
- extends java.lang.Object
A HandGroup represents a set of poker hands that can be referred to by
name. The specific way that hands are assigned to named groups is
specific to each poker game. For example, in Holdem, named groups
include specific holdings like "AhAd", "Kh2h"; canonical starting
hands like "AKs", "TT"; or abdulian groups like "Q8s+". Subclasses
like HoldemHandGroup define these groups for specific games.
- Author:
- Michael Maurer
Field Summary |
(package private) java.util.HashSet |
myhands
Set of Long objects, each a bitmask for one hand. |
(package private) java.lang.String |
myspec
String representation of hand group. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
myspec
java.lang.String myspec
- String representation of hand group. Subclasses should accept this
string in the constructor and save it here.
myhands
java.util.HashSet myhands
- Set of Long objects, each a bitmask for one hand. Subclasses should,
in their constructor, convert myspec into the set of corresponding
hands. The set should be immutable once set in the constructor.
HandGroup
public HandGroup()
isHandInGroup
public boolean isHandInGroup(long hand)
getHands
public long[] getHands()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toStringAtomic
public java.lang.String toStringAtomic()
PokerSource Home Page - Learn how you can contribute!