Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Java Tree Class

  1. #1
    Regular Coder BrickInTheWall's Avatar
    Join Date
    Mar 2009
    Location
    Munich, Germany
    Posts
    139
    Thanks
    1
    Thanked 13 Times in 13 Posts

    Java Tree Class

    Hi everybody,
    I need to implement something, and using an abstract syntax tree seems to be the easiest method. Sadly, I have to do it in Java, and was wondering if there is already a built in Java tree class that I can use for this, or if I have to write my own. I will have to do a lot of transformations on the tree. I would normally use C++ for this kind of work as I already have loads of templates lying around, but I have no option.

    Cheers,
    Brick
    Call me Brick, if you like!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    You'll need to write your own Tree, or find an already created package. The core doesn't appear to include a tree. There is a TreeSet and TreeMap, both of which follow an underlying tree model, but when it comes to an ADT where you are doing lots of your own transformations, I think it would just be easier to write your own instead of trying to adapt the currently existing models.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • Users who have thanked Fou-Lu for this post:

    BrickInTheWall (04-20-2011)

  • #3
    Regular Coder BrickInTheWall's Avatar
    Join Date
    Mar 2009
    Location
    Munich, Germany
    Posts
    139
    Thanks
    1
    Thanked 13 Times in 13 Posts
    Ok, thanks for the info!
    Call me Brick, if you like!

  • #4
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the info.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •