org.pokersource.enum
Class BaseHandGroup
java.lang.Object
org.pokersource.enum.BaseHandGroup
- Comparable, HandGroup
public class BaseHandGroup
extends java.lang.Object
Implements the HandGroup interface in a way that will work for most
poker games. Subclasses can override if necessary.
(package private) HashSet | myhands - Set of Long objects, each a bitmask for one hand.
|
(package private) String | myspec - String representation of hand group.
|
myhands
(package private) 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.
myspec
(package private) String myspec
String representation of hand group. Subclasses should accept this
string in the constructor and save it here.
compareTo
public int compareTo(Object o)
Define default sort order based on string representation.
getHands
public long[] getHands()
Returns an array of atomic hands (each encoded as a long).
- getHands in interface HandGroup
PokerSource Home Page - Learn how you can contribute!