Here you can find the source of mergeList(List sourceList, List resultList, Set filterSet)
public static Set mergeList(List sourceList, List resultList, Set filterSet)
//package com.java2s; //License from project: Apache License import java.util.List; import java.util.Set; public class Main { public static Set mergeList(List sourceList, List resultList, Set filterSet) {/* w w w . j a v a 2 s .c o m*/ if (sourceList == null) { return filterSet; } for (Object ratinigAID : sourceList) { if (filterSet.contains(ratinigAID)) { } else { resultList.add(ratinigAID); filterSet.add(ratinigAID); } } return filterSet; } }