org.pokersource.enum
Class HandValuation
java.lang.Object
org.pokersource.enum.HandValuation
public class HandValuation
extends java.lang.Object
Maintains a mapping from HandGroup to numeric value; defines methods for
sorting and selecting subsets of hand groups based on their numeric value.
void | fromFile(String path) - Subclasses should implement this according to their own file format.
|
void | fromStream(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(String[] args)
|
void | setValue(HandGroup group, double value) - Set the numeric value of the hand group.
|
String | toString()
|
HandValuation
public HandValuation()
HandValuation
public HandValuation(InputStream stream)
throws IOException
HandValuation
public HandValuation(String path)
throws IOException
fromFile
public void fromFile(String path)
throws IOException
Subclasses should implement this according to their own file format.
fromStream
public void fromStream(InputStream stream)
throws IOException
Subclasses should implement this according to their own file format.
getValue
public double getValue(HandGroup group)
Get the numeric value of the hand group.
greater
public HandGroup[] greater(double threshold)
Get all groups whose numeric value is greater than the threshold. The
groups will be sorted in increasing order of their numeric value.
greaterEqual
public HandGroup[] greaterEqual(double threshold)
Get all groups whose numeric value is greater than or equal to the
threshold. The groups will be sorted in increasing order of their
numeric value.
less
public HandGroup[] less(double threshold)
Get all groups whose numeric value is less than the threshold. The
groups will be sorted in increasing order of their numeric value.
lessEqual
public HandGroup[] lessEqual(double threshold)
Get all groups whose numeric value is less than or equal to the
threshold. The groups will be sorted in increasing order of their
numeric value.
main
public static void main(String[] args)
setValue
public void setValue(HandGroup group,
double value)
Set the numeric value of the hand group.
toString
public String toString()
PokerSource Home Page - Learn how you can contribute!