Java CSV from getepcList(String csv)

Here you can find the source of getepcList(String csv)

Description

getepc List

License

Apache License

Declaration

static List<String> getepcList(String csv) 

Method Source Code


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

import java.util.ArrayList;
import java.util.List;

public class Main {
    static List<String> getepcList(String csv) {
        String[] eqArr = csv.split(",");
        List<String> subStringList = new ArrayList<String>();
        for (int i = 0; i < eqArr.length; i++) {
            String eqString = eqArr[i].trim();
            String[] pat = eqString.split(":");
            if (pat[3].equals("idpat")) {
                String[] pat2 = pat[4].split("\\.");
                String conc = pat[0] + ":" + pat[1] + ":id" + ":" + pat[3] + ":" + pat2[0] + ".%";
                subStringList.add(conc);
                subStringList.add(eqString);
            } else {
                subStringList.add(eqString);
            }//from   ww  w. j a v  a  2  s.com

        }
        return subStringList;
    }
}

Related

  1. getCSVFromList(List myList)
  2. getCSVList(String csvList)
  3. getCSVList(String csvList)
  4. getCSVString(List items)
  5. getCsvStringsFromList(final List stringsToDelimit)
  6. getFixedArrayListSizeFromCSV(String csvString, int returnArrayListSize)
  7. getListFromCSV(String myCsv)
  8. getListFromCSV(String myCsv)
  9. getListFromCSVString(String csvString)