private boolean areAllEmpty(Object[]... arrays) { for (Object[] array : arrays) { if (!ArrayUtils.isEmpty(array)) { return false; } } return true; }
private boolean areAllEmpty(Object[]... arrays) { for (Object[] array : arrays) { if (!ArrayUtils.isEmpty(array)) { return false; } } return true; }
/** * Null-safe method to return the first element in the array or the {@code defaultValue} * if the array is {@literal null} or empty. * * @param <T> Class type of the array elements. * @param array the array from which to extract the first element. * @param defaultValue value to return if the array is {@literal null} or empty. * @return the first element in the array or {@code defaultValue} if the array is {@literal null} or empty. * @see #getFirst(Object[], Object) */ public static <T> T getFirst(T[] array, T defaultValue) { return isEmpty(array) ? defaultValue : array[0]; }
/** * Null-safe method to return the first element in the array or the {@code defaultValue} * if the array is {@literal null} or empty. * * @param <T> Class type of the array elements. * @param array the array from which to extract the first element. * @param defaultValue value to return if the array is {@literal null} or empty. * @return the first element in the array or {@code defaultValue} if the array is {@literal null} or empty. * @see #getFirst(Object[], Object) */ public static <T> T getFirst(T[] array, T defaultValue) { return isEmpty(array) ? defaultValue : array[0]; }
private boolean isDataSerializerSessionSerializerAdapterPresent() { return !ArrayUtils.isEmpty(getApplicationContext() .getBeanNamesForType(DataSerializerSessionSerializerAdapter.class)); }