class _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;
    }

}