<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<version>10.0.0</version>
</dependency>
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.factory.Lists;
public class Main {
public static void main(String[] args) {
MutableList<Integer> list = Lists.mutable.with(1, 2, 3, 4, 5);
MutableList<Integer> filteredList = list.select(num -> num % 2 == 0);
MutableList<String> mappedList = filteredList.collect(String::valueOf);
mappedList.each(System.out::println);
}
}