For instance, how would you declare a triple map like-
Map<String, Map<String, Map<Boolean, String>>>, with the keys being someKey1, someKey2, and someKey3 (true/false)?
I know until this-
<util:map
id="someMap"
map-class="java.util.HashMap"
key-type="java.lang.String"
value-type="java.lang.String">
<entry key="someKey1" value="someValue" />
</util:map>
EDIT:
Ok, this is what I want to do to reduce tons of if statements.
123: //some key 1
abc: //some key 2
true: //some key 3
a //some value
false: //some key 3
b //some value
456:
def:
true:
c
false:
d
Thanks a bunch.
Perhaps this would work:
<util:map id="someMap">
<entry key="123">
<value>
<map>
<entry key="abc">
<value>
<map key-type="java.lang.Boolean">
<entry key="true" value="a"/>
<entry key="false" value="b"/>
</map>
</value>
</entry>
</map>
</value>
</entry>
<entry key="456">
<value>
<map>
<entry key="def">
<value>
<map key-type="java.lang.Boolean">
<entry key="true" value="c"/>
<entry key="false" value="d"/>
</map>
</value>
</entry>
</map>
</value>
</entry>
</util:map>
Did you really get Adam's code to compile? I had to remove the outer value-tags to make it work.
<util:map id="someMap">
<entry key="123">
<map>
<entry key="abc">
<map key-type="java.lang.Boolean">
<entry key="true" value="a"/>
<entry key="false" value="b"/>
</map>
</entry>
</map>
</entry>
<entry key="456">
<map>
<entry key="def">
<map key-type="java.lang.Boolean">
<entry key="true" value="c"/>
<entry key="false" value="d"/>
</map>
</entry>
</map>
</entry>
</util:map>
Or am I missing something? =)