_Arrays { @SafeVarargs public static <T> T[] combine(T first, @Nullable T... rest) { _With.requires(first, "first"); final int restLength = _NullSafe.size(rest); final T[] all = _Casts.uncheckedCast(Array.newInstance(first.getClass(), restLength+1)); all[0] = first; if(restLength>0) { System.arraycopy(rest, 0, all, 1, restLength); } return all; }  static boolean testAnyMatch(
            @Nullable final T[] array1, 
            @Nullable final T[] array2, 
            final BiPredicate<T, T> test); static boolean testAllMatch(
            @Nullable final T[] array1, 
            @Nullable final T[] array2, 
            final BiPredicate<T, T> test); static boolean isArrayType(@Nullable final Class<?> cls); static boolean isCollectionOrArrayType(final Class<?> cls); static Collector<T,?,T[]> toArray(final Class<T> componentType, final int length); static Collector<T,?,T[]> toArray(final Class<T> componentType); @SafeVarargs static T[] combine(T first, @Nullable  T... rest); @SafeVarargs static T[] combineWithExplicitType(Class<T> type, X first, @Nullable  Y... rest); @SafeVarargs static T[] combine(T[] first, T... rest); static T[] toArray(@Nullable final Collection<? extends T> collection, final Class<T> componentType); static T[] toArray(@Nullable final Iterable<? extends T> iterable, final Class<T> componentType); static T[] removeByIndex(T[] array, int index); static @Nullable T[] emptyToNull(T[] array); static @Nullable Class<?> inferComponentTypeIfAny(@Nullable final Class<?> arrayType); static Optional<T> get(@Nullable T[] array, int index); @Nullable static R[] map(
            @Nullable T[] array, 
            @NonNull Class<R> resultElementType, 
            @NonNull Function<T, R> mapper); @Nullable static Object[] map(
            @Nullable T[] array, 
            @NonNull Function<T, ?> mapper); @Nullable static R[] mapCollection(
            @Nullable Collection<T> collection, 
            @NonNull Class<R> resultElementType, 
            @NonNull Function<T, R> mapper); @Nullable static Object[] mapCollection(
            @Nullable Collection<T> collection, 
            @NonNull Function<T, ?> mapper);  }
@Test void testCombineTTArray() { assertArrayEquals(new Integer[]{1}, _Arrays.combine(1)); assertArrayEquals(new Integer[]{1, 2}, _Arrays.combine(1, 2)); assertArrayEquals(new Integer[]{1, 2, 3}, _Arrays.combine(1, 2, 3)); assertArrayEquals(new Integer[]{1, 2, 3, 4}, _Arrays.combine(1, 2, 3, 4)); }
@Test void testCombineTArrayTArray() { assertArrayEquals(new Integer[]{}, _Arrays.combine(new Integer[]{})); assertArrayEquals(new Integer[]{1, 2}, _Arrays.combine(new Integer[]{1, 2})); assertArrayEquals(new Integer[]{1, 2, 3}, _Arrays.combine(new Integer[]{1, 2}, 3)); assertArrayEquals(new Integer[]{1, 2, 3, 4}, _Arrays.combine(new Integer[]{1, 2}, 3, 4)); }