IntStreams

public class org.apache.commons.lang3.stream.IntStreams[source]

Factory for IntStream.

Only a factory for now but could hold other functionality.

Since:

3.13.0

Constructors

IntStreams()

Deprecated. Make private in 4.0.

@Deprecated public IntStreams()[source]

Deprecated: TODO Make private in 4.0.

Make private in 4.0.

Methods

of(int[])

Null-safe version of IntStream#of(int[]).

range(int)

Shorthand for IntStream.range(0, i).

rangeClosed(int)

Shorthand for IntStream.rangeClosed(0, i).

@SafeVarargs public static IntStream of(int... values)[source]

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

public static IntStream range(int endExclusive)[source]

Shorthand for IntStream.range(0, i).

Parameters:

endExclusive – The exclusive upper bound.

Returns:

A sequential IntStream for the range of int elements.

public static IntStream rangeClosed(int endInclusive)[source]

Shorthand for IntStream.rangeClosed(0, i).

Parameters:

endInclusive – The inclusive upper bound.

Returns:

A sequential IntStream for the range of int elements.