I just want to move the transitionHash map values into the cardholderDataRecords arraylist.
HashMap transitionHash =
Converting Data HashSet to Array List
ArrayList<ExceptionLifeCycleDataBean> cardholderDataRecords = new ArrayList<ExceptionLifeCycleDataBean>(transitionHash);
Same Way, You can convert ArrayList to Hashmap.
You're trying to cast the collection of values to a single ExceptionLifeCycleDataBean
.
You can very easily get the list though:
List<ExceptionLifeCycleDataBean> beans =
new ArrayList<ExceptionLifeCycleDataBean>(transitionHash.values());
Or to add to an existing collection, with:
cardholderDataRecords.addAll(transitionHash.values());
No casts necessary.