/** * Get the percentage of not-null entries in a {@link List} of {@link BigDecimal} values * @param list the {@link List} of {@link BigDecimal} values * @return the percentage of not-null values as a {@link BigDecimal} value */ private static BigDecimal percentNotNullBigDecimal(List<BigDecimal> list) { if (list.size() > 0) { return new BigDecimal(countNotNull(list)).divide(new BigDecimal(list.size()), 16, BigDecimal.ROUND_HALF_EVEN).multiply(new BigDecimal(100)); } else { return null; } }