List of usage examples for java.util.stream LongStream builder
public static Builder builder()
From source file:Main.java
public static void main(String[] args) { LongStream.Builder b = LongStream.builder(); b.add(1L).add(2L).add(3L).add(4L);/*from w w w.ja v a2s .c o m*/ b.build().forEach(System.out::println); }
From source file:Main.java
public static void main(String[] args) { LongStream.Builder b = LongStream.builder(); b.accept(1L);// ww w.j ava 2s .com b.accept(2L); b.accept(3L); b.accept(4L); b.build().forEach(System.out::println); }
From source file:Main.java
public static void main(String[] args) { LongStream.Builder b = LongStream.builder(); b.accept(2L);/* www. j av a2 s. c o m*/ b.accept(2L); b.accept(2L); LongStream s = b.build(); s.forEach(System.out::println); }
From source file:com.mgmtp.perfload.perfalyzer.binning.BinManager.java
/** * Creates a {@link java.util.stream.LongStream} with the bin counts as its source. * * @return the stream//from w ww . j a v a2 s . c o m */ public LongStream countStream() { Builder builder = LongStream.builder(); bins.forEach(bin -> builder.add(bin.counter)); return builder.build(); }