从Long的ArrayList中删除重复项
/*来自 n o w j a v a . c o m*/ //package com.nowjava; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; public class Main { public static ArrayList<Long> removeDuplicates(ArrayList<Long> a_master) { ArrayList<Long> a = new ArrayList<Long>(a_master); Set<Long> set = new HashSet<Long>(); List<Long> newList = new ArrayList<Long>(); for (Iterator<Long> iter = a.iterator(); iter.hasNext();) { Long element = iter.next();