public final class ValidationUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T extends ToShapeId> |
findDuplicateShapeNames(java.util.Collection<T> shapes)
Find shape IDs in a collection that do not have case-insensitively
unique member names.
|
static java.lang.String |
orderedTickedList(java.util.Collection<?> values)
Creates a comma separated string made up of the given collection.
|
static java.util.List<java.lang.String> |
splitCamelCaseWord(java.lang.String word)
Splits a camelCase word into a list of words.
|
static java.lang.String |
tickedList(java.util.Collection<?> values)
Creates a comma separated string made up of the given collection.
|
static java.lang.String |
tickedList(java.util.stream.Stream<?> values) |
public static java.util.List<java.lang.String> splitCamelCaseWord(java.lang.String word)
word
- Word to split.public static java.lang.String orderedTickedList(java.util.Collection<?> values)
values
- Values to turn into a comma separated list.public static java.lang.String tickedList(java.util.Collection<?> values)
values
- Values to turn into a comma separated list.public static java.lang.String tickedList(java.util.stream.Stream<?> values)
public static <T extends ToShapeId> java.util.Map<java.lang.String,java.util.List<ShapeId>> findDuplicateShapeNames(java.util.Collection<T> shapes)
The returned map is sorted by the conflicting name, and the list of conflicting shape values is also sorted to ensure that validation events can just print the map directly with consistent error messages.
T
- The type of shape being checked.shapes
- Shapes collection to check.