kiwiproject / kiwi

A set of Java utilities that we could not find in Guava or Apache Commons...or we just felt like having our own version.
MIT License
12 stars 1 forks source link

Add methods in KiwiConstraintViolations to convert constraint violations to maps #1169

Closed sleberknight closed 3 months ago

sleberknight commented 4 months ago

Add methods in KiwiConstraintViolations to convert Set<ConstraintViolation<T> to JDK Map and Guava Multimap.

Specifically, methods to convert a set of constraint violations to:

There can be overloads of each of the above that accept a Function<Path, String> that specifies how to transform a property Path to a String. The default implementations can simply use Path::toString.