static <T, U> Seq<U> cast(Stream<? extends T> stream, Class<? extends U> type) {
        return seq(stream).map(type::cast);
    }
Cast all elements in a stream to a given type, possibly throwing a {@link ClassCastException}.
<p>
<pre><code>
// ClassCastException
Seq.of(1, "a", 2, "b", 3).cast(Integer.class)
</code></pre>

@see #ofType(Stream, Class) Seq.ofType(Stream, Class) If you want to filter and cast
jOOL/src/main/java/org/jooq/lambda/Seq.java