Index: trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/TaskTreeNode.java
===================================================================
--- trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/TaskTreeNodeImpl.java	(revision 470)
+++ trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/TaskTreeNode.java	(revision 557)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: TreeNode.java,v $
 // Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 06.11.2011 11:00:46 $
@@ -5,5 +4,4 @@
 // Creation  : 2011 by Patrick
 // Copyright : Patrick Harms, 2011
-//-------------------------------------------------------------------------------------------------
 
 package de.ugoe.cs.quest.tasktrees.treeimpl;
@@ -12,266 +10,217 @@
 import java.util.List;
 
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode;
-
-
-//-------------------------------------------------------------------------------------------------
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode;
+
 /**
  * TODO comment
- *
+ * 
  * @version $Revision: $ $Date: $
- * @author  2011, last modified by $Author: $
+ * @author 2011, last modified by $Author: $
  */
-//-------------------------------------------------------------------------------------------------
-public class TaskTreeNodeImpl implements TaskTreeNode
-{
-  /** */
-  private static int sTemporalId = 0;
-
-  /** */
-  private String mName;
-
-  /** */
-  private String mDescription;
-  
-  /** */
-  private int mId;
-  
-  /** children */
-  private List<TaskTreeNode> mChildren;
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   */
-  //-----------------------------------------------------------------------------------------------
-  TaskTreeNodeImpl(String name)
-  {
-    mName = name;
-    mId = getNewId();
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private static synchronized int getNewId()
-  {
-    if (sTemporalId == Integer.MAX_VALUE)
-    {
-      sTemporalId = 0;
-    }
-    
-    return sTemporalId++;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * @return Returns the name.
-   */
-  //-----------------------------------------------------------------------------------------------
-  public String getName()
-  {
-    return mName;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNode#getDescription()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public String getDescription()
-  {
-    return mDescription;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   */
-  //-----------------------------------------------------------------------------------------------
-  public synchronized List<TaskTreeNode> getChildren()
-  {
-    if ((mChildren == null) || (mChildren.size() == 0))
-    {
-      return new ArrayList<TaskTreeNode>();
-    }
-    
-    return mChildren.subList(0, mChildren.size());
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode#equals(TaskTreeNode)
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public boolean equals(TaskTreeNode taskTreeNode)
-  {
-    if (!this.getClass().isInstance(taskTreeNode))
-    {
-      return false;
-    }
-    
-    if (taskTreeNode.hashCode() != hashCode())
-    {
-      return false;
-    }
-    
-    TaskTreeNodeImpl other = (TaskTreeNodeImpl) taskTreeNode;
-    
-    if (mId != other.mId)
-    {
-      return false;
-    }
-    
-    if (!mName.equals(other.mName))
-    {
-      return false;
-    }
-    
-    synchronized (other)
-    {
-      if (mChildren == null)
-      {
-        return (other.mChildren == null);
-      }
-      else if (other.mChildren == null)
-      {
-        return (mChildren == null);
-      }
-      else if (other.mChildren.size() != mChildren.size())
-      {
-        return false;
-      }
-      
-      for (int i = 0; i < mChildren.size(); i++)
-      {
-        if (!mChildren.get(i).equals(other.mChildren.get(i)))
-        {
-          return false;
-        }
-      }
-    }
-
-    return true;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Object#hashCode()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public synchronized int hashCode()
-  {
-    return getClass().getSimpleName().hashCode();
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Object#toString()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public synchronized String toString()
-  {
-    if (mChildren == null)
-    {
-      return mName + "(" + mId + ")";
-    }
-    else
-    {
-      return mName + "(" + mId + ", " + mChildren.size() + " children)";
-    }
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param i
-   * @return 
-   */
-  //-----------------------------------------------------------------------------------------------
-  void setDescription(String description)
-  {
-    mDescription = description;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   */
-  //-----------------------------------------------------------------------------------------------
-  synchronized void addChild(TaskTreeNode child)
-  {
-    if (mChildren == null)
-    {
-      mChildren = new ArrayList<TaskTreeNode>();
-    }
-    
-    mChildren.add(child);
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   */
-  //-----------------------------------------------------------------------------------------------
-  synchronized void addChild(int index, TaskTreeNode child)
-  {
-    if (mChildren == null)
-    {
-      mChildren = new ArrayList<TaskTreeNode>();
-    }
-    
-    mChildren.add(index, child);
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param i
-   * @return 
-   */
-  //-----------------------------------------------------------------------------------------------
-  synchronized TaskTreeNode removeChild(int index)
-  {
-    return mChildren.remove(index);
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Object#clone()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public TaskTreeNode clone()
-  {
-    TaskTreeNodeImpl clone = null;
-    try
-    {
-      clone = (TaskTreeNodeImpl) super.clone();
-      
-      if (mChildren != null)
-      {
-        clone.mChildren = new ArrayList<TaskTreeNode>();
-      
-        for (TaskTreeNode child : mChildren)
-        {
-          clone.mChildren.add(child.clone());
-        }
-      }
-      
-    }
-    catch (CloneNotSupportedException e)
-    {
-      // this should never happen. Therefore simply dump the exception
-      e.printStackTrace();
-    }
-    
-    return clone;
-  }
+public class TaskTreeNode implements ITaskTreeNode {
+    /** */
+    private static int temporalId = 0;
+
+    /** */
+    private String name;
+
+    /** */
+    private String description;
+
+    /** */
+    private int id;
+
+    /** children */
+    private List<ITaskTreeNode> children;
+
+    /**
+     * 
+     */
+    public TaskTreeNode(String name) {
+        this.name = name;
+        id = getNewId();
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @return
+     */
+    private static synchronized int getNewId() {
+        if (temporalId == Integer.MAX_VALUE) {
+            temporalId = 0;
+        }
+
+        return temporalId++;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNode#getDescription()
+     */
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * 
+     */
+    public synchronized List<ITaskTreeNode> getChildren() {
+        if ((children == null) || (children.size() == 0)) {
+            return new ArrayList<ITaskTreeNode>();
+        }
+
+        return children.subList(0, children.size());
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode#equals(TaskTreeNode)
+     */
+    @Override
+    public boolean equals(ITaskTreeNode taskTreeNode) {
+        if (!this.getClass().isInstance(taskTreeNode)) {
+            return false;
+        }
+
+        if (taskTreeNode.hashCode() != hashCode()) {
+            return false;
+        }
+
+        TaskTreeNode other = (TaskTreeNode) taskTreeNode;
+
+        if (id != other.id) {
+            return false;
+        }
+
+        if (!name.equals(other.name)) {
+            return false;
+        }
+
+        synchronized (other) {
+            if (children == null) {
+                return (other.children == null);
+            }
+            else if (other.children == null) {
+                return (children == null);
+            }
+            else if (other.children.size() != children.size()) {
+                return false;
+            }
+
+            for (int i = 0; i < children.size(); i++) {
+                if (!children.get(i).equals(other.children.get(i))) {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public synchronized int hashCode() {
+        return getClass().getSimpleName().hashCode();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public synchronized String toString() {
+        if (children == null) {
+            return name + "(" + id + ")";
+        }
+        else {
+            return name + "(" + id + ", " + children.size() + " children)";
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param i
+     * @return
+     */
+    void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * 
+     */
+    synchronized void addChild(ITaskTreeNode child) {
+        if (children == null) {
+            children = new ArrayList<ITaskTreeNode>();
+        }
+
+        children.add(child);
+    }
+
+    /**
+     * 
+     */
+    synchronized void addChild(int index, ITaskTreeNode child) {
+        if (children == null) {
+            children = new ArrayList<ITaskTreeNode>();
+        }
+
+        children.add(index, child);
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param i
+     * @return
+     */
+    synchronized ITaskTreeNode removeChild(int index) {
+        return children.remove(index);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#clone()
+     */
+    @Override
+    public ITaskTreeNode clone() {
+        TaskTreeNode clone = null;
+        try {
+            clone = (TaskTreeNode) super.clone();
+
+            if (children != null) {
+                clone.children = new ArrayList<ITaskTreeNode>();
+
+                for (ITaskTreeNode child : children) {
+                    clone.children.add(child.clone());
+                }
+            }
+
+        }
+        catch (CloneNotSupportedException e) {
+            // this should never happen. Therefore simply dump the exception
+            e.printStackTrace();
+        }
+
+        return clone;
+    }
 
 }
