에서 중복 물체를 제거 나는 자바 클래스가;ArrayList를
Students students1 = new Students("har","mat","harmat");
Students students2 = new Students("pan","son","panson");
Students students3 = new Students("yogi","jos","yogijos");
Students students4 = new Students("har","mat","harmat");
Students students5 = new Students("pan","son","harmat");
Students students6 = new Students("yogi","jos","someotherUName");
Students students7 = new Students("yogi","jos","someotherUName2");
지금 모든 개체가 나는 다음과 같은 기준에 따라이 combinedList에서 중복 개체를 제거 할 combinedList
List combinedList = new ArrayList<SchoolStudents>();
에 추가됩니다; fName이 같거나 uName이 동일한 경우 그 두 학생이 동등한 경우 결정하는 일반적인 기준 인 경우
[ArrayList에 중복 값 찾기]의 중복 가능성 (http://stackoverflow.com/questions/7281352/finding-duplicate-values-in-arraylist) –
그리고 더 많은 중복에 http : // 유래 .com/questions/4778260/how-to-remove-arraylist-duplicate-values, http://stackoverflow.com/questions/9962082/prevent-duplicate-entries-in-arraylist, http://stackoverflow.com/questions/5181821/~에서 피하기 위해 중복 된 항목 -에 - arraylist, http://stackoverflow.com/questions/5754592/finding-index-of-duplicate-values-in-an-arraylist, http : //stackoverflow.com/questions/5503646/find-duplicate-objects-in-an-java-arraylist –
숙제 ?? 지금까지 뭐 해봤 어? 힌트 : comparable()를 사용하고 어쩌면 설정하십시오 – maasg