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> numbers = Lists.mutable.of(1, 2, 3, 4, 5);
MutableList<Integer> squaredNumbers = numbers.collect(n -> n * n);
MutableList<Integer> filteredNumbers = squaredNumbers.select(n -> n > 10);
filteredNumbers.each(System.out::println);
}
}
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
<version>10.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<version>10.0.0</version>
</dependency>