Package org.apache.camel.util
Class StreamUtils
- java.lang.Object
-
- org.apache.camel.util.StreamUtils
-
public final class StreamUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <C> Stream<C>
stream(Collection<C> value)
Creates a stream on the given collection if it is not nullstatic <K,V>
Stream<Map.Entry<K,V>>stream(Map<K,V> value)
Creates a stream of entries on the given Map if it is not null
-
-
-
Method Detail
-
stream
public static <C> Stream<C> stream(Collection<C> value)
Creates a stream on the given collection if it is not null- Parameters:
value
- the collection- Returns:
- A stream of elements or an empty stream if the collection is null
-
-