Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 1.47 KB

README.md

File metadata and controls

44 lines (36 loc) · 1.47 KB

ThrowingStream

Maven Central

This project is an alternative API to java.util.stream and its various supporting interfaces that allows for checked exceptions to be thrown.

Example usage:

Stream<String> names = Stream.of("java.lang.Object", "java.util.stream.Stream");
ThrowingStream<String, ClassNotFoundException> s = ThrowingStream.of(names, 
    ClassNotFoundException.class);
s.map(ClassLoader.getSystemClassLoader()::loadClass).forEach(System.out::println);

Output:

class java.lang.Object
interface java.util.stream.Stream

How can I use this library in my project?

git clone https://github.com/JeffreyFalgout/ThrowingStream
cd ThrowingStream/
mvn package
<dependency>
    <groupId>name.falgout.jeffrey</groupId>
    <artifactId>throwing-streams</artifactId>
    <version>X.Y.Z</version>
</dependency>

How does it work?

Check out the wiki.