|
PokerSource Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pokersource.enum.HandValuation
public class HandValuation
Maintains a mapping from HandGroup to numeric value; defines methods for sorting and selecting subsets of hand groups based on their numeric value.
Constructor Summary | |
---|---|
HandValuation()
|
|
HandValuation(java.io.InputStream stream)
|
|
HandValuation(java.lang.String path)
|
Method Summary | |
---|---|
void |
fromFile(java.lang.String path)
Subclasses should implement this according to their own file format. |
void |
fromStream(java.io.InputStream stream)
Subclasses should implement this according to their own file format. |
double |
getValue(HandGroup group)
Get the numeric value of the hand group. |
HandGroup[] |
greater(double threshold)
Get all groups whose numeric value is greater than the threshold. |
HandGroup[] |
greaterEqual(double threshold)
Get all groups whose numeric value is greater than or equal to the threshold. |
HandGroup[] |
less(double threshold)
Get all groups whose numeric value is less than the threshold. |
HandGroup[] |
lessEqual(double threshold)
Get all groups whose numeric value is less than or equal to the threshold. |
static void |
main(java.lang.String[] args)
|
void |
setValue(HandGroup group,
double value)
Set the numeric value of the hand group. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HandValuation()
public HandValuation(java.lang.String path) throws java.io.IOException
java.io.IOException
public HandValuation(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void fromFile(java.lang.String path) throws java.io.IOException
java.io.IOException
public void fromStream(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
public void setValue(HandGroup group, double value)
public double getValue(HandGroup group)
public HandGroup[] less(double threshold)
public HandGroup[] lessEqual(double threshold)
public HandGroup[] greater(double threshold)
public HandGroup[] greaterEqual(double threshold)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
PokerSource Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |