public void checkTree() {
		Map<TreeNode, TreeNode> nodes = this.useIdentity ? new IdentityHashMap<TreeNode, TreeNode>()
				:new HashMap<TreeNode,TreeNode>();
		
		// Traverse the tree and check if each node is only used once.
		addUniqueNodes(nodes,tree.getRoot());
	}
public void checkTree ( ) { Map < TreeNode , TreeNode > nodes = this . useIdentity ? new IdentityHashMap < TreeNode , TreeNode > ( ) : new HashMap < TreeNode , TreeNode > ( ) ; addUniqueNodes ( nodes , tree . getRoot ( ) ) ; }
Check if the tree is a "valid" tree.
<p>
Typically you will use this method during development when you get an
unexpected layout from your trees.
<p>
The following checks are performed:
<ul>
<li>Each node must only occur once in the tree.</li>
</ul>