public class StreamUtils extends Object
Constructor and Description |
---|
StreamUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> Stream<T> |
instancesOf(Stream<?> stream,
Class<? extends T> clazz)
Filters a stream for instances of a class and returns a typed stream
|
public static <T> Stream<T> instancesOf(Stream<?> stream, Class<? extends T> clazz)
T
- the type of the classstream
- the stream to filterclazz
- stream will be filtered to instances of this classT
Copyright © 2022 Apache Software Foundation. All rights reserved.