String[] arr = new String[CTlist.size()];
arr = CTlist.toArray(arr);
Map<String,Integer> map = new HashMap<String,Integer>();
for(int i = 0; i < arr.length; i++){
Integer value = map.get(arr[i]);
if(value==null)
map.put(arr[i], 1);
else
map.put(arr[i], ++value);
}
Set<Map.Entry<String,Integer>> set = map.entrySet();
for(Iterator<Map.Entry<String,Integer>> it = set.iterator(); it.hasNext();){
String tnum=null;
tnum=DbDao.getTnum(name);
Map.Entry<String, Integer> entry = it.next();
if(!entry.getKey().equals(tnum)){
String Tname=DbDao.getName(entry.getKey());
System.out.println("与"+Tname+"老师合作了"+entry.getValue()+"次");}
}
arr = CTlist.toArray(arr);
Map<String,Integer> map = new HashMap<String,Integer>();
for(int i = 0; i < arr.length; i++){
Integer value = map.get(arr[i]);
if(value==null)
map.put(arr[i], 1);
else
map.put(arr[i], ++value);
}
Set<Map.Entry<String,Integer>> set = map.entrySet();
for(Iterator<Map.Entry<String,Integer>> it = set.iterator(); it.hasNext();){
String tnum=null;
tnum=DbDao.getTnum(name);
Map.Entry<String, Integer> entry = it.next();
if(!entry.getKey().equals(tnum)){
String Tname=DbDao.getName(entry.getKey());
System.out.println("与"+Tname+"老师合作了"+entry.getValue()+"次");}
}