public static <T> String toPaddedMultiLine(final String padding,
                                               final Collection<T> items,
                                               final Function<T, String> itemMapper) {
        if (items == null || items.isEmpty()) {
            return "";
        } else {
            return items.stream()
                    .filter(Objects::nonNull)
                    .map(itemMapper)
                    .filter(str1 -> !NullSafe.isBlankString(str1))
                    .map(str -> Objects.requireNonNullElse(padding, "") + str)
                    .collect(Collectors.joining("\n"));
        }
    }
Output the value with its percentage of {@code total}, e.g. {@code 1000 (10%)}.
Supports numbers and {@link Duration} and {@link DurationAdder}.
stroom-util/src/main/java/stroom/util/logging/LogUtil.java