[ONC] Implement Synthesis Pod

This commit is contained in:
theelk801 2023-04-24 22:26:50 -04:00
parent aba51aadfd
commit b979f47cc3
3 changed files with 170 additions and 0 deletions

View file

@ -1705,6 +1705,10 @@ public final class CardUtil {
return sb.toString();
}
public static <T> Stream<T> castStream(Collection<?> collection, Class<T> clazz) {
return castStream(collection.stream(), clazz);
}
public static <T> Stream<T> castStream(Stream<?> stream, Class<T> clazz) {
return stream.filter(clazz::isInstance).map(clazz::cast).filter(Objects::nonNull);
}