Java CSV from getVendorIdsAndNames(String vendorCsv, List vendorNames, List vendorIDs)

Here you can find the source of getVendorIdsAndNames(String vendorCsv, List vendorNames, List vendorIDs)

Description

get Vendor Ids And Names

License

Apache License

Parameter

Parameter Description
vendorCsv a parameter
vendorNames a parameter
vendorIDs a parameter

Declaration

private static void getVendorIdsAndNames(String vendorCsv,
        List<String> vendorNames, List<String> vendorIDs) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;

import java.util.List;
import java.util.Map;

public class Main {
    private static Map<String, String> mapVendorNameToVendorId = new HashMap<String, String>();

    /**//from  www. j a va  2  s  .c  om
     * @param vendorCsv
     * @param vendorNames
     * @param vendorIDs
     */
    private static void getVendorIdsAndNames(String vendorCsv,
            List<String> vendorNames, List<String> vendorIDs) {
        if (vendorCsv != null && vendorCsv.length() > 0) {
            vendorNames.add(vendorCsv);
            if (mapVendorNameToVendorId != null
                    && mapVendorNameToVendorId.size() > 0) {
                vendorIDs.add(mapVendorNameToVendorId.get(vendorCsv));
            }
        }
    }
}

Related

  1. getListFromCSVString(String csvString)
  2. getPrintableCSVs(List list)
  3. getRightFirstRow(List csvRows)
  4. getStringList(String csv)
  5. getStringListFromCsv(String tags)
  6. listToCsv(List list)
  7. listToCsv(List listOfStrings, char separator)
  8. listToCsv(List strs)
  9. ListtoCSV(List thelist, String sep)