Top Description Constructors Methods
org.apache.commons.lang3.stream

public Class IntStreams

extends Object
Class Inheritance
Imports
java.util.stream.IntStream

Factory for IntStream.

Only a factory for now but could hold other functionality.

Since
3.13.0

Constructor Summary

AccessConstructor and Description
public
IntStreams()
Deprecated TODO Make private in 4.0.

Make private in 4.0.

Method Summary

Modifier and TypeMethod and Description
public static IntStream

Returns:

the new stream on values or IntStream#empty().
of
(final int...
the elements of the new stream, may be null.
values
)

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

public static IntStream

Returns:

a sequential IntStream for the range of int elements.
range
(final int
the exclusive upper bound.
endExclusive
)

Shorthand for IntStream.range(0, i).

public static IntStream

Returns:

a sequential IntStream for the range of int elements.
rangeClosed
(final int
the inclusive upper bound.
endInclusive
)

Shorthand for IntStream.rangeClosed(0, i).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IntStreamsback to summary
public IntStreams()

Deprecated

TODO Make private in 4.0.

Make private in 4.0.

Annotations
@Deprecated

Method Detail

ofback to summary
public static IntStream of(final int... values)

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

Parameters
values:int[]

the elements of the new stream, may be null.

Returns:IntStream

the new stream on values or IntStream#empty().

Annotations
@SafeVarargs
Since
3.18.0
rangeback to summary
public static IntStream range(final int endExclusive)

Shorthand for IntStream.range(0, i).

Parameters
endExclusive:int

the exclusive upper bound.

Returns:IntStream

a sequential IntStream for the range of int elements.

rangeClosedback to summary
public static IntStream rangeClosed(final int endInclusive)

Shorthand for IntStream.rangeClosed(0, i).

Parameters
endInclusive:int

the inclusive upper bound.

Returns:IntStream

a sequential IntStream for the range of int elements.