public class Arrayz {
/**
* Returns true if the array passed is {@code null} or has no elements
*
* @param array a nullable array to be checked
* @return true if array is null or has no elements
*/
public static <T> boolean isNullOrEmpty(T...array) {
return array == null || array.length == 0;
}
}
/**
* Returns true if the array passed is {@code null} or has no elements
*
* @param array a nullable array to be checked
* @return true if array is null or has no elements
*/
public static <T> boolean isNullOrEmpty(T...array) {
return array == null || array.length == 0;
}
}
No comments:
Post a Comment