List 컬렉션 필터링 데이터 중복 제거(JAVA안드로이드)

2558 단어 Android
 
  
 
  
    :
1.  Android IDE
2.     (IDE MyEclipse6.5)
3.       Webservices         List  
4.       







Test(dsad)           
  public void getmain(){
List dsad=Tkdao.hggetjtzt("  ", "2014-05-07 00:00:00", "2014-05-07 23:59:59");
Test(dsad);
}


public static void Test(List dsad){
           //         
           ArrayList arr = new ArrayList();
           //    
           ArrayList arrs = new ArrayList();
           
           //      
           String ztdall="";
           //    
    		for (int i = 0; i < dsad.size(); i++) {
    			//   
    			Hgztqk hg = dsad.get(i);
    			//    
    			String ztda= hg.getZtjlidall();
    			//        :,14,5,8   :14,5,8
    		    ztda=ztda.substring(1,ztda.length());
    		  
    		    // ‘,’       
    		    String a[] = ztda.split(",");
    		    //    
    		    for(int y=0;y) getNewList(arr);  //    
           
           //       ,             
           for(int i = 0; i < arr.size(); i++){
        	  // arr.get(i)   arrs       
        	  int agesd= Collections.frequency(arrs, arr.get(i)); 
        	  //                
        	  System.out.println(arr.get(i)+"    "+agesd);
           }
           //           
           System.out.println(arr);
        }
 
/**
     *       
     * @param li     
     * @return
     */
    public static List getNewList(List li){
        List list = new ArrayList();
        //      
        for(int i=0; i


 
  
http://bbs.csdn.net/topics/390247210
http://bbs.csdn.net/topics/120025156

 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
 

좋은 웹페이지 즐겨찾기