import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; public class EclipseCollectionsExample { public static void main(String[] args) { MutableList<Integer> list = Lists.mutable.with(1, 2, 3, 4, 5); MutableList<Integer> result = list.select(each -> each % 2 == 0) .collect(each -> each * 2); result.each(System.out::println); } }


上一篇:
下一篇:
切换中文