<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Generic (n-ary) Tree in Java</title>
	<atom:link href="http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
	<description>random musings of just another computer nerd</description>
	<lastBuildDate>Tue, 22 May 2012 16:32:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Devonte</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-33015</link>
		<dc:creator>Devonte</dc:creator>
		<pubDate>Fri, 24 Feb 2012 17:25:44 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-33015</guid>
		<description>Could you possibly send me a method that iterates over the whole tree?</description>
		<content:encoded><![CDATA[<p>Could you possibly send me a method that iterates over the whole tree?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devonte</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-32964</link>
		<dc:creator>Devonte</dc:creator>
		<pubDate>Thu, 23 Feb 2012 23:28:07 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-32964</guid>
		<description>main question though is that this can be more than just a binary tree? for example a quaternary tree where each node can lead to 4 options</description>
		<content:encoded><![CDATA[<p>main question though is that this can be more than just a binary tree? for example a quaternary tree where each node can lead to 4 options</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devonte</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-32961</link>
		<dc:creator>Devonte</dc:creator>
		<pubDate>Thu, 23 Feb 2012 22:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-32961</guid>
		<description>Is this the latest implementation on this website. I believe this is exactly what im looking for in my project. Just to be clear this is a tree that can have any number of root nodes? also the T data that could also be anything? e.g. a simple string or a whole list of properties per say?</description>
		<content:encoded><![CDATA[<p>Is this the latest implementation on this website. I believe this is exactly what im looking for in my project. Just to be clear this is a tree that can have any number of root nodes? also the T data that could also be anything? e.g. a simple string or a whole list of properties per say?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj Rajan</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-28821</link>
		<dc:creator>Manoj Rajan</dc:creator>
		<pubDate>Mon, 09 Jan 2012 11:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-28821</guid>
		<description>Thanks, vivin.

It was helpful. Implementation was easy and understandable much faster.</description>
		<content:encoded><![CDATA[<p>Thanks, vivin.</p>
<p>It was helpful. Implementation was easy and understandable much faster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivin</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25766</link>
		<dc:creator>vivin</dc:creator>
		<pubDate>Sun, 11 Dec 2011 19:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-25766</guid>
		<description>&lt;a href=&quot;http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25730&quot; rel=&quot;nofollow&quot;&gt;@John Vorwald&lt;/a&gt;: Thanks!</description>
		<content:encoded><![CDATA[<p><a href="http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25730" rel="nofollow">@John Vorwald</a>: Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivin</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25765</link>
		<dc:creator>vivin</dc:creator>
		<pubDate>Sun, 11 Dec 2011 19:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-25765</guid>
		<description>&lt;a href=&quot;http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25747&quot; rel=&quot;nofollow&quot;&gt;@Fernando&lt;/a&gt;: The purpose of the &quot;build&quot; methods is to return a representation of the tree as a list in either preorder, or postorder form. The &quot;buildWithDepth&quot; returns a representation of the tree with the depths of the node as well, which is useful if you&#039;re trying to provide a graphical representation of the tree.

In hindsight, I believe it would have been better to implement an iterator!</description>
		<content:encoded><![CDATA[<p><a href="http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25747" rel="nofollow">@Fernando</a>: The purpose of the &#8220;build&#8221; methods is to return a representation of the tree as a list in either preorder, or postorder form. The &#8220;buildWithDepth&#8221; returns a representation of the tree with the depths of the node as well, which is useful if you&#8217;re trying to provide a graphical representation of the tree.</p>
<p>In hindsight, I believe it would have been better to implement an iterator!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25747</link>
		<dc:creator>Fernando</dc:creator>
		<pubDate>Sun, 11 Dec 2011 17:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-25747</guid>
		<description>Hi,

Probably I`m missing the point but what is the real purpose of build* methods? I mean, except for testing, why I would use a List&lt;GenericTreeNode&gt; ? BTW, I don&#039;t think that &quot;build&quot; is the correct name. Can you &quot;build a generic tree&quot; ?

My $,02.

Cheers,

--FM</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Probably I`m missing the point but what is the real purpose of build* methods? I mean, except for testing, why I would use a List&lt;GenericTreeNode&gt; ? BTW, I don&#8217;t think that &#8220;build&#8221; is the correct name. Can you &#8220;build a generic tree&#8221; ?</p>
<p>My $,02.</p>
<p>Cheers,</p>
<p>&#8211;FM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Vorwald</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-25730</link>
		<dc:creator>John Vorwald</dc:creator>
		<pubDate>Sun, 11 Dec 2011 12:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-25730</guid>
		<description>Here are two additional routines to allow searching for data.


	public List&lt;GenericTreeNode&gt; locateOccurances(T data) {
		List&lt; GenericTreeNode &gt; occurances = new ArrayList&lt;GenericTreeNode&gt;();
		if (root != null) {
			occurances.addAll( locateOccurances(root, data) );
		}
		return occurances;
	}
	
	public List&lt;GenericTreeNode&gt; locateOccurances(GenericTreeNode node, T data) {
		List&lt; GenericTreeNode &gt; occurances = new ArrayList&lt;GenericTreeNode&gt;();

		if (node.data == data) {
			occurances.add(node);
		}
		for (GenericTreeNode child:node.children) {
			occurances.addAll( locateOccurances(child, data) );
		}
        return occurances;
	}</description>
		<content:encoded><![CDATA[<p>Here are two additional routines to allow searching for data.</p>
<p>	public List&lt;GenericTreeNode&gt; locateOccurances(T data) {<br />
		List&lt; GenericTreeNode &gt; occurances = new ArrayList&lt;GenericTreeNode&gt;();<br />
		if (root != null) {<br />
			occurances.addAll( locateOccurances(root, data) );<br />
		}<br />
		return occurances;<br />
	}</p>
<p>	public List&lt;GenericTreeNode&gt; locateOccurances(GenericTreeNode node, T data) {<br />
		List&lt; GenericTreeNode &gt; occurances = new ArrayList&lt;GenericTreeNode&gt;();</p>
<p>		if (node.data == data) {<br />
			occurances.add(node);<br />
		}<br />
		for (GenericTreeNode child:node.children) {<br />
			occurances.addAll( locateOccurances(child, data) );<br />
		}<br />
        return occurances;<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: miliardopiscrat</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-20449</link>
		<dc:creator>miliardopiscrat</dc:creator>
		<pubDate>Fri, 23 Sep 2011 23:14:42 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-20449</guid>
		<description>hi

class GenericTreeNode.java line 68, put there keyword @Override and see if it compile.</description>
		<content:encoded><![CDATA[<p>hi</p>
<p>class GenericTreeNode.java line 68, put there keyword @Override and see if it compile.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maven project for Generic (n-ary) Tree in Java &#124; Rough Book</title>
		<link>http://vivin.net/2010/01/30/generic-n-ary-tree-in-java/comment-page-1/#comment-15590</link>
		<dc:creator>Maven project for Generic (n-ary) Tree in Java &#124; Rough Book</dc:creator>
		<pubDate>Wed, 25 May 2011 16:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://vivin.net/?p=1395#comment-15590</guid>
		<description>[...] Guus was kind enough to make a maven project for the Generic Tree. He also fixed an error in my equals method for the GenericTreeNode (I intended to do Object.equals(Object obj) but was doing GenericTreeNode.equals(GenericTreeNode obj). Since it&#8217;s a maven project, you can easily create a jar out of it and add it as a dependency to your project. You can download the project here. Thanks Guus! AKPC_IDS += &quot;1405,&quot;;Popularity: unranked [?]    Related PostsGeneric (n-ary) Tree in JavaCherryBlossomIntroducing CherryBlossomif-else in bAdkOdebAdkOde: An Esoteric LanguageJSTL, instanceof, and hasPropertyDuct-tape programmers are not heroesPerformance testing using The GrinderRunning the JavaFX 1.1 SDK on LinuxRunning the JavaFX 1.0 SDK on Linux   Categories: Java, Programming and Development Tags: data structures, generic trees, java, k-ary trees, n-ary trees, programming, software engineering, trees (data structure)       Comments (3) Trackbacks (0) Leave a comment Trackback [...]</description>
		<content:encoded><![CDATA[<p>[...] Guus was kind enough to make a maven project for the Generic Tree. He also fixed an error in my equals method for the GenericTreeNode (I intended to do Object.equals(Object obj) but was doing GenericTreeNode.equals(GenericTreeNode obj). Since it&#8217;s a maven project, you can easily create a jar out of it and add it as a dependency to your project. You can download the project here. Thanks Guus! AKPC_IDS += &quot;1405,&quot;;Popularity: unranked [?]    Related PostsGeneric (n-ary) Tree in JavaCherryBlossomIntroducing CherryBlossomif-else in bAdkOdebAdkOde: An Esoteric LanguageJSTL, instanceof, and hasPropertyDuct-tape programmers are not heroesPerformance testing using The GrinderRunning the JavaFX 1.1 SDK on LinuxRunning the JavaFX 1.0 SDK on Linux   Categories: Java, Programming and Development Tags: data structures, generic trees, java, k-ary trees, n-ary trees, programming, software engineering, trees (data structure)       Comments (3) Trackbacks (0) Leave a comment Trackback [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

