Class IntStreams


  • public class IntStreams
    extends java.lang.Object
    Factory for IntStream.

    Only a factory for now but could hold other functionality.

    Since:
    3.13.0
    • Constructor Summary

      Constructors 
      Constructor Description
      IntStreams()
      Deprecated.
      TODO Make private in 4.0.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.stream.IntStream of​(int... values)
      Null-safe version of IntStream.of(int[]).
      static java.util.stream.IntStream range​(int endExclusive)
      Shorthand for IntStream.range(0, i).
      static java.util.stream.IntStream rangeClosed​(int endInclusive)
      Shorthand for IntStream.rangeClosed(0, i).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntStreams

        @Deprecated
        public IntStreams()
        Deprecated.
        TODO Make private in 4.0.
        Make private in 4.0.
    • Method Detail

      • of

        @SafeVarargs
        public static java.util.stream.IntStream of​(int... values)
        Null-safe version of IntStream.of(int[]).
        Parameters:
        values - the elements of the new stream, may be null.
        Returns:
        the new stream on values or IntStream.empty().
        Since:
        3.18.0
      • range

        public static java.util.stream.IntStream range​(int endExclusive)
        Shorthand for IntStream.range(0, i).
        Parameters:
        endExclusive - the exclusive upper bound.
        Returns:
        a sequential IntStream for the range of int elements.
      • rangeClosed

        public static java.util.stream.IntStream rangeClosed​(int endInclusive)
        Shorthand for IntStream.rangeClosed(0, i).
        Parameters:
        endInclusive - the inclusive upper bound.
        Returns:
        a sequential IntStream for the range of int elements.