MCPcopy Create free account
hub / github.com/apache/commons-lang / of

Method of

src/main/java/org/apache/commons/lang3/stream/Streams.java:675–677  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 15

testOfArrayMethod · 0.95
testOfCollectionNullMethod · 0.95
testOfEnumerationMethod · 0.95
testOfIterableNotNullMethod · 0.95
testOfIterableNullMethod · 0.95
testOfIteratorNotNullMethod · 0.95
testOfIteratorNullMethod · 0.95
testOfVarArgMethod · 0.95
containsAnyMethod · 0.95
firstNonNullMethod · 0.95
getFirstNonNullMethod · 0.95

Calls 1

streamMethod · 0.45

Tested by 9

testOfArrayMethod · 0.76
testOfCollectionNullMethod · 0.76
testOfEnumerationMethod · 0.76
testOfIterableNotNullMethod · 0.76
testOfIterableNullMethod · 0.76
testOfIteratorNotNullMethod · 0.76
testOfIteratorNullMethod · 0.76
testOfVarArgMethod · 0.76