Reputation: 3329
Here's code:
List<SelectOption<String>> validMemberList = ValidDataUtil.getValidMemberType();
Can anyone tell me :
How can convert the List<SelectOption<Integer>>
to List<SelectOption<String>>
?
Upvotes: 1
Views: 403
Reputation: 32478
How can convert the
List<SelectOption<Integer>> to List<SelectOption<String>>
?
You can't, because both are two different data types. Iterate the list and convert each element with toString()
method.
Upvotes: 1
Reputation: 1075059
How can convert the
List<SelectOption<Integer>>
toList<SelectOption<String>>
?
You can't, directly. You can loop through the first and use toString
on each of the integers to build the second, though.
Upvotes: 3