Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - ArrayList Hashmap getValue

ArrayList Hashmap getValue

Put your problem here if it does not fit any of the other categories.

ArrayList Hashmap getValue

Postby bacarni » Fri Jan 14, 2011 12:08 pm

Hello,
I'm trying to get values out of my ArrayList.
With
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. result.get(groupPosition).toString()
Parsed in 0.010 seconds, using GeSHi 1.0.8.4

I get the following
Code: Select all
[{tableName=ThermoVerstaendnis, cardName=Verstaendnis}, {tableName=ThermoZahlen, cardName=Zahlen}]


But now I have no clue to catch these values...
bacarni
Freshman
Freshman
 
Posts: 2
Joined: Tue Nov 23, 2010 5:32 pm

Top

Re: ArrayList Hashmap getValue

Postby Jems » Fri Jan 14, 2011 1:06 pm

If your ArrayList contains objects of type MyClass, then just do:
MyClass o = result.get(groupPosition);
Then access the data using whatever methods/fields are provided by o.
Jems
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Thu Dec 09, 2010 7:42 pm

Re: ArrayList Hashmap getValue

Postby bacarni » Fri Jan 14, 2011 1:27 pm

It was not a Class, but it was an <ArrayList<ArrayList<HashMap>>>. So I just turned everything around and now I can access my values in the HashMap.

Thanks for your help. You poked me to the right way.
bacarni
Freshman
Freshman
 
Posts: 2
Joined: Tue Nov 23, 2010 5:32 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 10 guests