Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pokersource.enumerate
Class HandValuation

    java.lang.Object
      org.pokersource.enumerate.HandValuation

Direct Known Subclasses:
  HoldemHandOrdering

    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.

Author:
  Michael Maurer <mjmaurer@yahoo.com>

Field Summary
`private ValueSortedMap` | `values` ValueSortedMap of {HandGroup, Double} giving value of each hand.

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`

Field Detail

### values

    private ValueSortedMap values

  ValueSortedMap of {HandGroup, Double} giving value of each hand.

Constructor Detail

### HandValuation

    public HandValuation()

### HandValuation

    public HandValuation(java.lang.String path)
                  throws java.io.IOException

Throws:
  `java.io.IOException`

### HandValuation

    public HandValuation(java.io.InputStream stream)
                  throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### fromFile

    public void fromFile(java.lang.String path)
                  throws java.io.IOException

  Subclasses should implement this according to their own file format.

  Throws:
    `java.io.IOException`

### fromStream

    public void fromStream(java.io.InputStream stream)
                    throws java.io.IOException

  Subclasses should implement this according to their own file format.

  Throws:
    `java.io.IOException`

### setValue

    public void setValue(HandGroup group,
                         double value)

  Set the numeric value of the hand group.

### getValue

    public double getValue(HandGroup group)

  Get the numeric value of the hand group.

### 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.

### 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.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD