Paul Clapham wrote:I can't even imagine why you would want to have such a class, let alone marshal it to XML.
implementing routing table - key is destination router, value is next-hop router; and the class is router itself - I know that it is quite an unusual data structure...
Paul Clapham wrote:However... can you give an example of what the marshalled XML would look like for a typical element of that class?
this would represent class A, where id=1 and map contains two entries:
key - object A with id 1; value = object A with id 2
key - object A with id 2; value = object A with id 3
so when marshalling HashMap, IDs will be used instead of real objects and when unmarshalling, IDs will be replaced with related objects