java.lang.Object
org.apache.jena.atlas.lib.StreamOps
Collect some stream operations into one place.
Sometimes, the function form reads better.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <X> Stream<X>Print immediate, noting empty streamsstatic <X> Xelement(Collection<X> collection) An element from aCollectionstatic <X> XFirst element or nullstatic <X> Stream<X>print(PrintStream out, String leader, Stream<X> stream) static <X> Stream<X>print(PrintStream out, Stream<X> stream) static <X> Stream<X>Debug : print stream.static <X> Stream<X>Iterator to Stream.static <X> List<X>Stream toListstatic <X> Set<X>Stream toSet
-
Constructor Details
-
StreamOps
public StreamOps()
-
-
Method Details
-
stream
Iterator to Stream. Call to Iter.asStream(java.util.Iterator<T>). -
toList
Stream toList -
toSet
Stream toSet -
first
First element or null -
element
An element from aCollection -
print
Debug : print stream. This operation prints the whole stream at the point it is used, and then returns a new stream of the same elements. -
print
-
print
-
debug
Print immediate, noting empty streams
-