This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

what is hash tree  RSS feed

 
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
 
  • 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...
 
Marshal
Posts: 60098
188
  • 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 }.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!