Java’s missing TreeMap

One thing I have always found lacking in Java collections/containers is TreeMap. A simple class that takes a hierarchical approach to mapping data to a node.  Given a hierarchical string like “/java/myapp/javafx/config/phone” I can set the various objects relative to this on that node.

Java Preferences() class supports this hierarchical approach but it is limited to native data types. I have never understood why this has been missing from the JRE.  So I created my own implementation and here it is for anyone else looking.

Here is the code to let you place any kind of object on a specified node.


  • Ghostprogrammer
  • I am known for being able to quickly decipher difficult problems to assist development teams in producing a solution. I have been called upon to be the Team Lead for multiple large-scale projects. I have a keen interest in learning new technologies, always ready for a new challenge.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: