pal.tree
Class NodeFactory

java.lang.Object
  |
  +--pal.tree.NodeFactory

public class NodeFactory
extends java.lang.Object

Creates nodes The purpose of this class is to decouple the creation of a class of type "Node" from its actual implementation. This class should be used instead of calling the constructor of an implementation of "Node" (at the moment "SimpleNode") as it may change in the future.

Other plans: add features here to recyle old nodes rather than leaving them to the Java garbage collector


Constructor Summary
NodeFactory()
           
 
Method Summary
static Node createNode()
          create a node
static Node createNode(Node node)
          constructor used to clone a node and all children
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeFactory

public NodeFactory()
Method Detail

createNode

public static Node createNode()
create a node

createNode

public static Node createNode(Node node)
constructor used to clone a node and all children