PokerSource Java API

org.pokersource.enum
Class HoldemHandGroupFactory

java.lang.Object
  extended by org.pokersource.enum.HoldemHandGroupFactory

public class HoldemHandGroupFactory
extends java.lang.Object

Creates instances of HoldemHandGroup-implementing objects from their string representations. Use of this factory is preferred to directly calling the constructors of subclasses, as the factory maintains a cache of immutable instances.

Author:
Michael Maurer <mjmaurer@yahoo.com>

Method Summary
static HoldemHandGroup getInstance(java.lang.String groupSpec)
          Tries to parse groupSpec into a hand group using the constructors of the list of known classes.
static HoldemHandGroup getInstance(java.lang.String groupSpec, java.lang.Class gclass)
          Tries to parse groupSpec into a hand group using the gclass constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static HoldemHandGroup getInstance(java.lang.String groupSpec,
                                          java.lang.Class gclass)
Tries to parse groupSpec into a hand group using the gclass constructor. If gclass fails to parse groupSpec, throws a runtime exception.


getInstance

public static HoldemHandGroup getInstance(java.lang.String groupSpec)
Tries to parse groupSpec into a hand group using the constructors of the list of known classes. If all known classes fail to parse groupSpec, throws a runtime exception.


PokerSource Java API

PokerSource Home Page - Learn how you can contribute!