Class ConfigList<T,U,V>
java.lang.Object
io.github.ttno1.configvalidation.ConfigNode<List<T>,V>
io.github.ttno1.configvalidation.ConfigList<T,U,V>
- Type Parameters:
T
- The data type of the listU
- The output type of the element filterV
- The output type of the filter
Represents a list of elements that should exist in a configuration.
Specifies a data type, a filter, and an element filter that a list node should match.
The element filter is applied to each element separately to produce a list of type U and the filter is applied to the List<U> produced by applying the element filter to the input.
When a list is validated against a ConfigWrapper, the type of the list is verified to be correct and both filters are confirmed to have passed.
Specifies a data type, a filter, and an element filter that a list node should match.
The element filter is applied to each element separately to produce a list of type U and the filter is applied to the List<U> produced by applying the element filter to the input.
When a list is validated against a ConfigWrapper, the type of the list is verified to be correct and both filters are confirmed to have passed.
-
Method Summary
Modifier and TypeMethodDescriptionvalidate
(ConfigWrapper configWrapper, String path) Validates this node against the suppliedConfigWrapper
at the specified path.
Checks for existence of the node, valid data type, and filter passage.Methods inherited from class io.github.ttno1.configvalidation.ConfigNode
thenRun, withFilter
-
Method Details
-
validate
Description copied from class:ConfigNode
Validates this node against the suppliedConfigWrapper
at the specified path.
Checks for existence of the node, valid data type, and filter passage.- Overrides:
validate
in classConfigNode<List<T>,
V> - Parameters:
configWrapper
- theConfigWrapper
to validate againstpath
- the absolute path of this node in the ConfigWrapper- Returns:
- a
ConfigValidationResult
containing whether the validation was successful and a fail message if it failed
-