日期:2014-05-20 浏览次数:20721 次
String filter=""; Iterator<String> it = al9.iterator(); Iterator itt = al9.iterator(); while(itt.hasNext()){ String bom = (String)itt.next(); String[] boma = bom.split("\\$"); if(filter.equals("")){ Iterator it2 = al9.iterator(); while(it2.hasNext()){ String bom2 = (String)it2.next(); String[] bom2a = bom2.split("\\$"); if((bom2a[2].equals(boma[2])) && (bom2a[1].equals(boma[1])) && (bom2a[3].equals(boma[3]))){ bomal2.add(bom2); } //i01++; } filter=filter+boma[0]+"$"+boma[2]+"$"+boma[3]+";"; }else if(filter.contains(boma[2]+"$"+boma[3]+";")){ }else{ Iterator it2 = al9.iterator(); while(it2.hasNext()){ String bom2 = (String)it2.next(); String[] bom2a = bom2.split("\\$"); if((bom2a[2].equals(boma[2])) && (bom2a[1].equals(boma[1])) && (bom2a[3].equals(boma[3]))){ bomal2.add(bom2); } //i02++; } filter=filter+boma[2]+"$"+boma[3]+";"; } }
ArrayList<String> al9 = new ArrayList<String>(); ArrayList<String> bomal2 = new ArrayList<String>(); String filter = ""; Iterator<String> it = al9.iterator(); Iterator itt = al9.iterator(); while (itt.hasNext()) { String bom = (String) itt.next(); String[] boma = bom.split("\\$"); if (filter.equals("")) { Iterator it2 = al9.iterator(); while (it2.hasNext()) { String bom2 = (String) it2.next(); String[] bom2a = bom2.split("\\$"); if ((bom2a[2].equals(boma[2])) && (bom2a[1].equals(boma[1])) && (bom2a[3].equals(boma[3]))) { bomal2.add(bom2); } // i01++; } filter = filter + boma[0] + "$" + boma[2] + "$" + boma[3] + ";"; } else if (filter.contains(boma[2] + "$" + boma[3] + ";")) { } else { Iterator it2 = al9.iterator(); while (it2.hasNext()) { String bom2 = (String) it2.next(); String[] bom2a = bom2.split("\\$"); if ((bom2a[2].equals(boma[2])) && (bom2a[1].equals(boma[1])) && (bom2a[3].equals(boma[3]))) { bomal2.add(bom2); } // i02++; } filter = filter + boma[2] + "$" + boma[3] + ";"; } }