Example usage for java.util.stream IntStream asLongStream

List of usage examples for java.util.stream IntStream asLongStream

Introduction

In this page you can find the example usage for java.util.stream IntStream asLongStream.

Prototype

LongStream asLongStream();

Source Link

Document

Returns a LongStream consisting of the elements of this stream, converted to long .

Usage

From source file:Main.java

public static void main(String[] args) {
    IntStream i = IntStream.of(1, 2, 3, 4);
    LongStream l = i.asLongStream();
    l.forEach(System.out::println);
}