Compare commits
2 Commits
7a3801affe
...
8acec7446a
Author | SHA1 | Date | |
---|---|---|---|
8acec7446a | |||
737c769c56 |
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
insert_final_newline = true
|
@ -35,6 +35,7 @@ public class MapValidator {
|
|||||||
this.rules.add(rule);
|
this.rules.add(rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected final <R> ObjectValidator<Map<String, Object>, R> ruleFor(String key) {
|
protected final <R> ObjectValidator<Map<String, Object>, R> ruleFor(String key) {
|
||||||
ObjectValidator<Map<String, Object>, R> validValueHolder = new ObjectValidator<>(map -> (R) map.get(key));
|
ObjectValidator<Map<String, Object>, R> validValueHolder = new ObjectValidator<>(map -> (R) map.get(key));
|
||||||
propertyValidators.add(validValueHolder);
|
propertyValidators.add(validValueHolder);
|
||||||
@ -65,6 +66,7 @@ public class MapValidator {
|
|||||||
return validValueHolder;
|
return validValueHolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected final <E> CollectionValidator<Map<String, Object>, E> ruleForCollection(String key) {
|
protected final <E> CollectionValidator<Map<String, Object>, E> ruleForCollection(String key) {
|
||||||
CollectionValidator<Map<String, Object>, E> validValueHolder = new CollectionValidator<>(m -> (Collection<E>) m.get(key));
|
CollectionValidator<Map<String, Object>, E> validValueHolder = new CollectionValidator<>(m -> (Collection<E>) m.get(key));
|
||||||
propertyValidators.add(validValueHolder);
|
propertyValidators.add(validValueHolder);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user