public static List<NameValuePair> toNameValuePair(Object parent,Map<String,String> map){
  List<NameValuePair> list=new ArrayList<NameValuePair>();
  for (  String key : map.keySet()) {
    NameValuePair nvp=new NameValuePair(parent,key,map.get(key));
    list.add(nvp);
  }
  return list;
}

public static List < NameValuePair > toNameValuePair ( Object parent , Map < String , String > map ) { List < NameValuePair > list = new ArrayList < NameValuePair > ( ) ; for ( String key : map . keySet ( ) ) { NameValuePair nvp = new NameValuePair ( parent , key , map . get ( key ) ) ; list . add ( nvp ) ; } return list ; }
creates a list of namevaluepair from a map
