on 06-21-2007 1:09 PM
Hi everybody,
I used a sortedMap to save one value to one key and want to save these data in an ArrayList. The result of my coding is that tm[TreeMap of my object] (TreeMap filled but neither key nor value is saved in the variables k & v).
strTimePeriode l_lastList = new strTimePeriode(); // Structur: Tt_key/ Tt_value
List l_uebergabe = new ArrayList();
Iterator tmIter = myCounter.tm.values().iterator();
while (tmIter.hasNext())
{
try{
strTimePeriode l_str = (strTimePeriode)tmIter.next();
String k = l_str.getTt_key();
int v = l_str.getTt_value();
l_lastList.setTt_key(k);
l_lastList.setTt_value(v);
l_uebergabe.add(l_lastList);
}
catch(Exception e)
{
}
finally{}
}
Could anybody help me?
Kind regards,
Kathrin
strTimePeriode l_lastList = new strTimePeriode();
should be executed inside loop...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you can tell your requirement, it can be better understood.
Can you please let me know the same
regards
Vivek Nidhi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kathrin,
I cant understand strTimePeriode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.