(Iterable<?> it)
| 2407 | } |
| 2408 | |
| 2409 | private static final <T> List<T> newListWithCapacity(Iterable<?> it) { |
| 2410 | return it instanceof Collection<?> c ? new ArrayList<>(c.size()) : new ArrayList<>(); |
| 2411 | } |
| 2412 | |
| 2413 | static final <T, R, X extends Throwable> R apply(@Nullable T t, ThrowingFunction<? super @NotNull T, ? extends R, ? extends X> f) throws X { |
| 2414 | return t == null ? null : f.apply(t); |