All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.sunchenbin.mybatis.actable.utils.ArrayUtils Maven / Gradle / Ivy

Go to download

A.CTable is a Maven project based on Spring and Mybatis, which enhances the function of Mybatis

There is a newer version: 1.5.0.RELEASE
Show newest version
package com.gitee.sunchenbin.mybatis.actable.utils;

import java.lang.reflect.Array;

public class ArrayUtils {

	public static Object[] addAll(Object[] array1, Object[] array2) {
        if (array1 == null) {
            return array2.clone();
        } else if (array2 == null) {
            return array1.clone();
        }
        Object[] joinedArray = (Object[]) Array.newInstance(array1.getClass().getComponentType(),
                                                            array1.length + array2.length);
        System.arraycopy(array1, 0, joinedArray, 0, array1.length);
        System.arraycopy(array2, 0, joinedArray, array1.length, array2.length);
        return joinedArray;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy