link.thingscloud.freeswitch.esl.util.ArrayUtils Maven / Gradle / Ivy
package link.thingscloud.freeswitch.esl.util;
import java.lang.reflect.Array;
/**
* ArrayUtils class.
*
* @author zhouhailin
* @version 1.0.0
*/
public class ArrayUtils {
/**
* isEmpty.
*
* @param array an array of {@link java.lang.Object} objects.
* @return a boolean.
*/
public static boolean isEmpty(final Object[] array) {
return getLength(array) == 0;
}
/**
* getLength.
*
* @param array a {@link java.lang.Object} object.
* @return a int.
*/
public static int getLength(final Object array) {
if (array == null) {
return 0;
}
return Array.getLength(array);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy