In my current project, I want to convert List<String> to RegionLabel Object.
For instance, User enters String value one by one in order — center, floor, room . I am storing user’s input into List.
Now, my internal data structure in RegionLabel( String centerString, String floorString, String roomString);
My requirement is to convert List<String> data structure into RegionLabel("center", floor", "room" ); data structure.
One note:
My RegionLabel class is generated on-fly. On-fly means at design time, I do not know that “how many arguments RegionLabel constructors have?”
-Pankesh
Create a new constructor like
RegionLabel(List<String> list). This should do.