Empty Streams

Empty implementations of the Stream interface.

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

empty-streams
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

Empty Streams
Empty implementations of the Stream interface.
Project URL

Project URL

https://github.com/marschall/empty-streams
Source Code Management

Source Code Management

https://github.com/marschall/empty-streams

Download empty-streams

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/empty-streams/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>empty-streams</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/empty-streams/
implementation 'com.github.marschall:empty-streams:0.3.0'
// https://jarcasting.com/artifacts/com.github.marschall/empty-streams/
implementation ("com.github.marschall:empty-streams:0.3.0")
'com.github.marschall:empty-streams:jar:0.3.0'
<dependency org="com.github.marschall" name="empty-streams" rev="0.3.0">
  <artifact name="empty-streams" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='empty-streams', version='0.3.0')
)
libraryDependencies += "com.github.marschall" % "empty-streams" % "0.3.0"
[com.github.marschall/empty-streams "0.3.0"]

Dependencies

test (5)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar
org.junit.jupiter : junit-jupiter-engine jar
org.junit.jupiter : junit-jupiter-params jar
org.hamcrest : hamcrest-junit jar 2.0.0.0
org.openjdk.jmh : jmh-core jar 1.27

Project Modules

There are no modules declared in this project.

Empty Streams Build Status Maven Central Javadocs

Empty implementations of the Java java.util.stream.Stream, java.util.stream.IntStream, java.util.stream.LongStream and java.util.stream.DoubleStream

Compared to java.util.stream.Stream#empty(), java.util.stream.IntStream#empty(), java.util.stream.LongStream#empty() and java.util.stream.DoubleStream#empty() these implementations can be more efficient.

Because streams are inherently stateful, they have a state which may be closed, a minimum of allocation can not be avoided.

The behavior of these streams might slightly differ to the JDK streams when it comes to spliterator characteristics but should still be compliant the with API contract requirements outlined in the Javadoc.

Versions

Version
0.3.0
0.2.0
0.1.0