org.moyoman.debug
Class Forest

java.lang.Object
  |
  +--org.moyoman.debug.Debug
        |
        +--org.moyoman.debug.Forest

public class Forest
extends Debug

This debug type represents sequences of moves. A move is returned as a MoveDescriptor object, so that details such as prisoners are taken care of.


Field Summary
private  MoveDescriptorForest forest
          The MoveDescriptorForest object which stores the sequences of MoveDescriptor objects.
 
Fields inherited from class org.moyoman.debug.Debug
 
Constructor Summary
Forest(String header, MoveDescriptorForest mdf)
          Create a new Forest debug object.
 
Method Summary
 MoveDescriptor[] getInitialMoveDescriptors()
          Get the initial move in the sequence.
 MoveDescriptor[] getSubsequentMoveDescriptors(MoveDescriptor parent)
          Get the follow up moves to the specified move.
 DebugType getType()
          Get the debug type of this object.
 
Methods inherited from class org.moyoman.debug.Debug
getHeaderType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

forest

private MoveDescriptorForest forest
The MoveDescriptorForest object which stores the sequences of MoveDescriptor objects.

Constructor Detail

Forest

public Forest(String header,
              MoveDescriptorForest mdf)
Create a new Forest debug object.

Parameters:
header - - The explanation of what this data means.
mdf - - The MoveDescriptorForest object.
Method Detail

getInitialMoveDescriptors

public MoveDescriptor[] getInitialMoveDescriptors()
Get the initial move in the sequence.

Returns:
An array of MoveDescriptor objects.

getSubsequentMoveDescriptors

public MoveDescriptor[] getSubsequentMoveDescriptors(MoveDescriptor parent)
                                              throws InconsistentStateException
Get the follow up moves to the specified move.

Parameters:
parent - - The current move.
Returns:
An array of MoveDescriptor objects.
Throws:
InconsistentStateException - - Thrown if parent is not in the forest.

getType

public DebugType getType()
Get the debug type of this object.

Specified by:
getType in class Debug
Returns:
A DebugType object.