static String valuesToString()

in src/main/java/org/apache/sling/repoinit/parser/operations/SetProperties.java [81:94]


    static String valuesToString(@NotNull List<Object> values, @Nullable PropertyLine.PropertyType type) {
        List<String> strings = values.stream()
                .map(o -> {
                    if (type == null || type == PropertyLine.PropertyType.String) {
                        return escapeQuotes(Objects.toString(o, ""));
                    } else if (type == PropertyLine.PropertyType.Date) {
                        return "\"" + ISO8601.format((Calendar) o) + "\"";
                    } else {
                        return Objects.toString(o, null);
                    }
                })
                .collect(Collectors.toList());
        return listToString(strings);
    }