Example usage for java.util.stream IntStream builder

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

Introduction

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

Prototype

public static Builder builder() 

Source Link

Document

Returns a builder for an IntStream .

Usage

From source file:Main.java

public static void main(String[] args) {
    IntStream i = IntStream.builder().add(0).build();
    i.forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) throws Exception {

    IntStream.builder().add(1).add(3).add(5).add(7).add(11).build().average().ifPresent(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    IntStream.Builder b = IntStream.builder();
    b.add(1).add(2).add(3).add(4);//from   w  w w .  j a v  a  2  s . c om

    b.build().forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    IntStream.Builder b = IntStream.builder();
    b.accept(1);/*  ww w .j  ava 2 s.  c  o  m*/
    b.accept(2);
    b.accept(3);
    b.accept(4);

    b.build().forEach(System.out::println);
}