W
WP
Hello, I wan't to change something about my design, let me try and explain:
I'm developing some research tools for a university institution. It's my
first programming job, so be gentle, please.
During parsing of an XML schema file I build up a map. I have objects of
class A as the key and objects of class B as the value. Class B contains
objects of class C, but those objects can be null.
Sorry for the abstract names, but the real stuff in this research tool
is pretty abstract too, heh.
Here's my problem. Sometimes I have an object of class C (you know, that
is also contained by B) and from that I need to get class A (the key to
the map). How should I do this? A given object C will only occur once
among the B:s in the map. I've been maintaining a second map thus far
(key: class C, value: class A) but I want to get rid of the second map.
Any suggestions welcome!
- WP
I'm developing some research tools for a university institution. It's my
first programming job, so be gentle, please.
During parsing of an XML schema file I build up a map. I have objects of
class A as the key and objects of class B as the value. Class B contains
objects of class C, but those objects can be null.
Sorry for the abstract names, but the real stuff in this research tool
is pretty abstract too, heh.
Here's my problem. Sometimes I have an object of class C (you know, that
is also contained by B) and from that I need to get class A (the key to
the map). How should I do this? A given object C will only occur once
among the B:s in the map. I've been maintaining a second map thus far
(key: class C, value: class A) but I want to get rid of the second map.
Any suggestions welcome!
- WP