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

Method stream

src/main/java/org/apache/commons/lang3/EnumUtils.java:466–468  ·  view source on GitHub ↗

Returns a sequential ordered stream whose elements are the given class' enum values. @param the type of stream elements. @param clazz the class containing the enum values, may be null. @return the new stream, empty of clazz is null. @since 3.18.0 @see Class#getEnumConstants()

(final Class<T> clazz)

Source from the content-addressed store, hash-verified

464 * @see Class#getEnumConstants()
465 */
466 public static <T> Stream<T> stream(final Class<T> clazz) {
467 return clazz != null ? Streams.of(clazz.getEnumConstants()) : Stream.empty();
468 }
469
470 /**
471 * This constructor is public to permit tools that require a JavaBean

Callers 5

testStreamMethod · 0.95
getEnumMapMethod · 0.95
getFirstEnumMethod · 0.95
processBitVectorsMethod · 0.95

Calls 1

ofMethod · 0.95

Tested by 1

testStreamMethod · 0.76