• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is hash tree  RSS feed

 
Puneet N Vyas
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is hash tree in java,how can we make hash tree,is there any inbuild API available,i need to build a hash tree for storing candidate sequences,for example consider the following string:
a abc ac d cf
the possible candidate sequences could be:
a a
a c
a d
ac
a and so on,
i need to first generate all these subsequences and store each of them in hash tree

thanks for support
 
Balasubramanian Chandrasekaran
Ranch Hand
Posts: 215
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get a HashTree from apache package


You can view its document
Here

This one is part of JMeter
You can get the Binary which is needed from this link.
 
Puneet N Vyas
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.lang.Object.*;
//.org.apache.jorphan.collections.HashTree
import org.apache.jorphan.collections.HashTree.*;
public class hashex
{

public static void main(String args[])
{

HashTree();

System.out.println("puneet hash tree");
}

this is the sample code i wrote ,but i gave me error,seems to as if
some problem,can you help me in giving an example...
 
Campbell Ritchie
Marshal
Posts: 56576
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In future, please copy and paste the errors you are getting; it makes it easier for us to understand what is going on.

Miss out the .* after your imports. You either write the name of the package and .* or the name of the class. You have written the name of the class, so you don't need the .* [unless you want a static import, which you don't].

Miss out the import for java.lang.Object; you don't usually need to import anything from java.lang [unless you want a static import, which you don't].

To create a HashTree object you need "new" before HashTree(). Even then, you are creating the object and not making any use of it. You will have to do things like inserting elements, traversing the tree, or removing elements.

Make sure you have every { matched with a }.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!