K
Ken
Hello Java Experts,
I am quite new to Java.
I have created a Structure of HashMaps, LinkedLists, Strings and
Integers.
I want to know how to display this structure but toString() does not
seem to be the answer. I need the string output: it will do something
funny like
{this object}, 5
Here is the Structure:
The Head Element is a HashMap all hashmaps use Strings for keys.
The values of a hashmap maybe of type: Map (Implemented as Hashmap but
I will change over to a LinkedHashMap as order is a requirement),
List(Implemented as LinkedList), String, or Integer.
LinkedLists may contain: Maps, Lists, Strings, Integers.
What I want to do is spit out the data in some format which I can use
to validate that I've constructed the data structure correctly.
If there are no recommendations I am sure later tonight the NetBeans
IDE will show me if the obect has been created correctly. However I
would find it interesting if there is a simple solution.
Any help much appreciated,
Ken.
I am quite new to Java.
I have created a Structure of HashMaps, LinkedLists, Strings and
Integers.
I want to know how to display this structure but toString() does not
seem to be the answer. I need the string output: it will do something
funny like
{this object}, 5
Here is the Structure:
The Head Element is a HashMap all hashmaps use Strings for keys.
The values of a hashmap maybe of type: Map (Implemented as Hashmap but
I will change over to a LinkedHashMap as order is a requirement),
List(Implemented as LinkedList), String, or Integer.
LinkedLists may contain: Maps, Lists, Strings, Integers.
What I want to do is spit out the data in some format which I can use
to validate that I've constructed the data structure correctly.
If there are no recommendations I am sure later tonight the NetBeans
IDE will show me if the obect has been created correctly. However I
would find it interesting if there is a simple solution.
Any help much appreciated,
Ken.