聞かれたのでメモ Javaの場合 Collection同士ならこんな感じ 冗長な処理とか気にしない import java.util.ArrayList; import java.util.HashSet; import java.util.List; public class DuplicatedList { public static void main(String[] args) { List<String> list = new ArrayList<String>(); list.add("aaa"); list.add("aaa"); list.add("bbb"); list.add("bbb"); System.out.println(list); HashSet<String> hashSet = new HashSet<String>(); hashSet.addAll