Delegates to Collection#stream() or returns Stream#empty() if the collection is null. @param The type of elements in the collection. @param collection the collection to stream or null. @return Collection#stream() or Stream#empty() if the collection is null. @sinc
(final Collection<E> collection)
| 673 | * @since 3.13.0 |
| 674 | */ |
| 675 | public static <E> Stream<E> of(final Collection<E> collection) { |
| 676 | return collection == null ? Stream.empty() : collection.stream(); |
| 677 | } |
| 678 | |
| 679 | /** |
| 680 | * Streams the elements of the given enumeration in order. |