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)
| 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 |