Here you can find the source of longArray(Stream
Parameter | Description |
---|---|
stream | the Stream of Long to convert to an array |
public static long[] longArray(Stream<Long> stream)
//package com.java2s; //License from project: Open Source License import java.util.stream.Stream; public class Main { /**/*w w w . ja v a2 s .co m*/ * Returns an array view of a Stream of Long * * @param stream the Stream of Long to convert to an array * @return an array view */ public static long[] longArray(Stream<Long> stream) { return stream.mapToLong(Long::valueOf).toArray(); } }