source: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/NodeFactory.java @ 1573

Last change on this file since 1573 was 1573, checked in by rkrimmel, 10 years ago

Now really adding PAL Library

File size: 972 bytes
Line 
1// NodeFactory.java
2//
3// (c) 1999-2001 PAL Development Core Team
4//
5// This package may be distributed under the
6// terms of the Lesser GNU General Public License (LGPL)
7
8
9package de.ugoe.cs.autoquest.tasktrees.alignment.pal.tree;
10
11
12/**
13 * Creates nodes
14 * <b>
15 * The purpose of this class is to decouple the creation of
16 * a class of type "Node" from its actual implementation.  This
17 * class should be used instead of calling the constructor
18 * of an implementation of "Node"
19 * (at the moment "SimpleNode") as it may change in the future.</b><p>
20 *
21 * Other plans: add features here to recyle old nodes rather than
22 * leaving them to the Java garbage collector
23 *
24 * @author Korbinian Strimmer
25 */
26public class NodeFactory
27{
28        /** create a node */
29        public static Node createNode()
30        {
31                return new FengDoolittleNode();
32        }
33       
34        /** constructor used to clone a node and all children */
35        public static Node createNode(Node node)
36        {
37                return new FengDoolittleNode(node);
38        }
39}
Note: See TracBrowser for help on using the repository browser.