Example usage for java.util.stream IntStream mapToObj

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

Introduction

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

Prototype

<U> Stream<U> mapToObj(IntFunction<? extends U> mapper);

Source Link

Document

Returns an object-valued Stream consisting of the results of applying the given function to the elements of this stream.

Usage

From source file:Main.java

public static void main(String[] args) {
    IntStream i = IntStream.of(6, 5, 7, 1, 2, 3, 3);
    Stream<String> d = i.mapToObj(n -> Integer.toBinaryString(n));
    d.forEach(System.out::println);
}