Hi,
I am reading this from my xml file:
<Taxes>
<Tax TaxCode="code1" Amount="500.00"/>
<Tax TaxCode="code2" Amount="100.00"/>
<Tax TaxCode="code3" Amount="100.00"/>
<Tax TaxCode="code4" Amount="1000.00"/>
<Tax TaxCode="code5" Amount="2000.00"/>
</Taxes>
and am passing the Taxcodes as keys and the Amounts as values into a HashMap.
My Problem is, if there are more than 3 TaxCodes, i have to return the amounts of the "extra" Taxcodes as a summed value and forget about the other taxcodes. Thus leaving me with:
<Tax TaxCode="code1" Amount="500.00"/>
<Tax TaxCode="code2" Amount="100.00"/>
<Tax TaxCode="code3" Amount="3100.00"/>
Is Hashmap the way to go here - or is there an easier way?