Algorithm
Development Kit 1.0

algs.model.gametree.debug
Class MinMaxNode

java.lang.Object
  extended by algs.model.gametree.debug.MinMaxNode
All Implemented Interfaces:
IGraphEntity, ISelectFont

public class MinMaxNode
extends java.lang.Object
implements IGraphEntity, ISelectFont

Represents a Min or Max node in the debugging output.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Nested Class Summary
 
Nested classes/interfaces inherited from interface algs.debug.IGraphEntity
IGraphEntity.Formatter
 
Constructor Summary
MinMaxNode(java.util.Comparator<java.lang.Integer> selector)
          Construct node based upon its MIN/MAX type.
 
Method Summary
 java.lang.String fontName()
          To properly draw INF/-INF in symbol font.
 int fontSize()
          Default font size to use is ok.
 java.lang.String nodeLabel()
          Show computed value with prefix of MIN/MAX as appropriate.
 int value()
          Return the value of the node.
 void value(int value)
          Set the computed value for the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinMaxNode

public MinMaxNode(java.util.Comparator<java.lang.Integer> selector)
Construct node based upon its MIN/MAX type.

Parameters:
selector - MIN or MAX
Throws:
java.lang.IllegalArgumentException - if neither MIN nor MAX is the actual parameter.
Method Detail

value

public int value()
Return the value of the node.


value

public void value(int value)
Set the computed value for the node.


nodeLabel

public java.lang.String nodeLabel()
Show computed value with prefix of MIN/MAX as appropriate.

Specified by:
nodeLabel in interface IGraphEntity

fontName

public java.lang.String fontName()
To properly draw INF/-INF in symbol font.

Specified by:
fontName in interface ISelectFont

fontSize

public int fontSize()
Default font size to use is ok.

Specified by:
fontSize in interface ISelectFont

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.