getting values from ValueMap | Community
Skip to main content
srinivas_channa
Level 2
October 16, 2015
Solved

getting values from ValueMap

  • October 16, 2015
  • 1 reply
  • 707 views

Hi,

I am wanted to know as how could i get values from valuemap at run time from the below code . If I had say properties that were of type

String
StringArry []
boolean
Date



List<Map> testMap = new ArrayList<Map>();
            testMap.add(resourceProp);
           

 

 
            for(Map<String,? extends Object> map:testMap){
                ......
            }

 

In the for loop I would need to keep  object typecasted manually to the actual type by checking Instance Of. Is there any better way to do it.

Thanks,
Srinivas

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

As you said need to make use of instanceOf & no other way IMO.

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

As you said need to make use of instanceOf & no other way IMO.