public abstract class StreamUtils extends Object
StreamUtils class is a abstract utility class for working with Streams.Stream| Constructor and Description |
|---|
StreamUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Stream<T> |
concat(Stream<T>... streams)
|
static long |
nullSafeCount(Stream<?> stream)
|
static boolean |
nullSafeIsEmpty(Stream<?> stream)
Null-safe utility method used to determine whether the given
Stream is empty. |
static <T> Stream<T> |
nullSafeStream(Stream<T> stream)
Utility method used to guard against null
Streams. |
public static long nullSafeCount(Stream<?> stream)
stream - Stream of elements to count.count of the number of elements in the Stream.Stream.count(),
nullSafeStream(Stream)public static boolean nullSafeIsEmpty(Stream<?> stream)
Stream is empty.stream - Stream to evalute.Stream is empty.Stream,
nullSafeCount(Stream)Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.