Here you can find the source of longList(LongStream stream)
Parameter | Description |
---|---|
stream | the LongStream to convert to a List |
public static List<Long> longList(LongStream stream)
//package com.java2s; //License from project: Open Source License import java.util.List; import java.util.stream.LongStream; import static java.util.stream.Collectors.toList; public class Main { /**/* w ww.j a va 2 s. c o m*/ * Returns a List view of a LongStream * * @param stream the LongStream to convert to a List * @return a List view */ public static List<Long> longList(LongStream stream) { return stream.mapToObj(Long::valueOf).collect(toList()); } }