2018-03-04 17:42:36 +02:00

20 lines
428 B
Java

package com.baeldung.eclipsecollections;
import java.util.List;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
public class ConvertContainerToAnother {
@SuppressWarnings("rawtypes")
public static List convertToList() {
UnifiedSet<String> cars = new UnifiedSet<>();
cars.add("Toyota");
cars.add("Mercedes");
cars.add("Volkswagen");
return cars.toList();
}
}