package com.cim.idm.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ToUpperUtils {

	public List<Map<String,Object>> toUpper (List<Map<String,Object>> param) {

		List<Map<String, Object>> list = new ArrayList<Map<String,Object> >();
		for(int i = 0;i < param.size(); i++)
		{
			Map<String, Object> orderMap = param.get(i);
			Map<String, Object> hashMap = new HashMap<String,Object>();
			orderMap.forEach((k,v)->{
				String Key = (String) k;
				String value = null;

				if (v == null) 
				{
					value = "";
				} 
				else if (v instanceof String){
					value = (String) v;
				}else{
					value = String.valueOf(v);
				}
				
				hashMap.put(Key.toUpperCase(), value);
			});
			list.add(hashMap);

		}
		return list;

	}
}
