Rough Book

random musings of just another computer nerd

Maven project for Generic (n-ary) Tree in Java

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’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!

Popularity: 6% [?]

March 2, 2010 - Posted by | Java, Programming and Development | , , , , , , ,

3 Comments »

  1. Hi Vivin,

    I just downloaded the files. Can you help me understand how the classes GenericTreeNode and GenericTree tie tigether? If I just want to build a tree of objects of type T, would I need the GenericTree class?

    ReplyReply

    Comment by mayank | December 6, 2010

  2. @mayank
    Take a look here here; I’ve got an example that uses both classes. The GenericTreeNode class represents each node in the tree whereas the GenericTree class provides you operations that work on the tree of nodes. You can build a tree of objects using just nodes, but you won’t be able to operate on the tree unless you use the GenericTree class.

    ReplyReply

    Comment by vivin | December 6, 2010

  3. Hi,

    I tried building with the new version of maven (3) but get lots of errors. I was able to build with the old version of maven.

    Might I suggest that a jar is included, or, better yet, that a project (like google code) is used with a pre-built jar available in the downloads?

    I can set it up if you would like.

    I look forward to trying out your library!

    Thanks,

    Mark

    ReplyReply

    Comment by Mark | April 28, 2011


Leave a Comment

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
All original content on these pages is fingerprinted and certified by Digiprove