JTreeMap is a java class storing objects in a directory structure. This means that one can list the keys and content of each "directory". The API methods have basically the same names as their unix counterparts.
In Perl there is a language part called Hashes of Hashes to build tree like structures referenced by name.
This basically creates a directory type structure we all know from the file system, not for files but for scalar values. In OSes we use a "/" or a "\" as delimiter for file systems.
Since the file system is something everybody knows I use this analogy for JTreeMap with the method names common in unix. As a directory separator the default value is a colon ":" But It can be set with the Constructor.
To store a value one use the insert method.
To get the value again, one use the read method:
To get a list of the "directory" content one just use
In project one find a lot of container classes with no logic beside getters and setters. All these different container classes could be replaced with one map to avoid "OverClassification". This mostly lead to a situation, where one "can't see the wood for the trees".
Since one class can replace a lot of classes, this save a lot of coding and could be especially useful in prototyping.
J-Tree consists in the core of one generic JTreeMap class. There is a small String implementation I use. Furthermore there are some Exceptions thrown. This version just need the apache logging for output.
I don't defined a separate versioning for JTreeMap since I heavily use it in the templating framework action4JAVA I named J-Tree before January 2013.
Beside the template framework I think these two small classes can be useful just by itself in a java project.
JTree is the base for the template solution http://www.action4java.org/.