from set to list and viceversa

Set theSet=...
List list = new ArrayList(theSet); 
 
//Viceversa
List theList=... 
Set theSet = new LinkedHashSet(theList);