Java Stream of streamInt(int max)

Here you can find the source of streamInt(int max)

Description

stream Int

License

Open Source License

Declaration

public static IntStream streamInt(int max) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.stream.IntStream;

public class Main {
    public static IntStream streamInt(int max) {
        return streamInt(0, 1, max);
    }// ww w  .j  a  va 2  s  . co m

    public static IntStream streamInt(int start, int max) {
        return streamInt(start, 1, max);
    }

    public static IntStream streamInt(int start, int step, int max) {
        return IntStream.iterate(start, i -> i + step).limit(max - start);
    }
}

Related

  1. stream(Iterable iterable)
  2. stream(Iterable it)
  3. stream(Iterator iterator)
  4. stream(Object values)
  5. streamEquals(Stream a, Stream b)
  6. streamOf (final Iterable iterable)
  7. streamOf(Iterable it)
  8. streamOf(Iterable iterable)
  9. streamof(Iterable vals)