HashMap<String, Integer> rotoHashMap = new HashMap<String, Integer>();
String xxKey = "";
// HashMapの構築
for (int i = 0; i< xxxList.size(); i++) {
xxKey = xxxList.get(i).getName();
if (rotoHashMap.containsKey(xxKey)) {
rotoHashMap.put(xxKey, rotoWakeGokeiHashMap.get(xxKey) + 1);
} else {
rotoHashMap.put(xxKey, 1);
}
}
List<xxxxxInfo_st> xxxLt = new ArrayList<xxxxxInfo_st>();
// 上記構築されたHashMapに従って、処理を行う
// eg. 重複的なnameではないレコードを削除する
for (int i = 0; i< xxxList.size(); i++) {
xxKey = xxxList.get(i).getName();
if (rotoHashMap.containsKey(xxKey) && rotoWakeGokeiHashMap.get(xxKey) > 1) {
xxxLt.add(xxxList.get(i));
}
}