javacollections

Java: Generic List to Set conversion and vice versa


I Need a java function which converts from java.util.List to java.util.Set and vice versa, independent of type of objects in the List/Set.


Solution

  • Like List.addAll and Set.addAll?