java add a list to a set code example
Example 1: java list to set
Set<Foo> foo = new HashSet<Foo>(myList);
Example 2: java add a list to a list
List mylist.addAll(secondList);
Set<Foo> foo = new HashSet<Foo>(myList);
List mylist.addAll(secondList);