Uses of Class
io.github.ttno1.configvalidation.ConfigNode
Packages that use ConfigNode
-
Uses of ConfigNode in io.github.ttno1.configvalidation
Subclasses of ConfigNode in io.github.ttno1.configvalidationModifier and TypeClassDescriptionclass
ConfigList<T,
U, V> 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.class
ConfigSpec<U>
A Configuration Specification that specifies various ConfigNodes that must be present in a configuration.
This class is used to validate a config with many nodes.
Specifies list of nodes and their corresponding locations (paths) in the configuration.
When a ConfigSpec is validated against a ConfigWrapper, each of its contained nodes are validated as well.Methods in io.github.ttno1.configvalidation that return ConfigNodeModifier and TypeMethodDescriptionstatic ConfigNode
<Boolean, Boolean> Cfg.Node.ofBoolean()
Creates a ConfigNode for a boolean value with no filter (the filter always passes).static <W> ConfigNode
<Boolean, W> Cfg.Node.ofBoolean
(ConfigFilter<Boolean, W> filter) Creates a ConfigNode for a boolean value with the specified filter.static ConfigNode
<Byte, Byte> Cfg.Node.ofByte()
Creates a ConfigNode for a byte value with no filter (the filter always passes).static <W> ConfigNode
<Byte, W> Cfg.Node.ofByte
(ConfigFilter<Byte, W> filter) Creates a ConfigNode for a byte value with the specified filter.static ConfigNode
<Double, Double> Cfg.Node.ofDouble()
Creates a ConfigNode for a double value with no filter (the filter always passes).static <W> ConfigNode
<Double, W> Cfg.Node.ofDouble
(ConfigFilter<Double, W> filter) Creates a ConfigNode for a double value with the specified filter.static ConfigNode
<Float, Float> Cfg.Node.ofFloat()
Creates a ConfigNode for a float value with no filter (the filter always passes).static <W> ConfigNode
<Float, W> Cfg.Node.ofFloat
(ConfigFilter<Float, W> filter) Creates a ConfigNode for a float value with the specified filter.static ConfigNode
<Integer, Integer> Cfg.Node.ofInteger()
Creates a ConfigNode for a integer value with no filter (the filter always passes).static <W> ConfigNode
<Integer, W> Cfg.Node.ofInteger
(ConfigFilter<Integer, W> filter) Creates a ConfigNode for a integer value with the specified filter.static ConfigNode
<Long, Long> Cfg.Node.ofLong()
Creates a ConfigNode for a long value with no filter (the filter always passes).static <W> ConfigNode
<Long, W> Cfg.Node.ofLong
(ConfigFilter<Long, W> filter) Creates a ConfigNode for a long value with the specified filter.static ConfigNode
<Short, Short> Cfg.Node.ofShort()
Creates a ConfigNode for a short value with no filter (the filter always passes).static <W> ConfigNode
<Short, W> Cfg.Node.ofShort
(ConfigFilter<Short, W> filter) Creates a ConfigNode for a short value with the specified filter.static ConfigNode
<String, String> Cfg.Node.ofString()
Creates a ConfigNode for a string value with no filter (the filter always passes).static <W> ConfigNode
<String, W> Cfg.Node.ofString
(ConfigFilter<String, W> filter) Creates a ConfigNode for a string value with the specified filter.ConfigNode
<T, U> Convenience method that returns a new ConfigNode with the provided consumer appended onto the current filter akin toConfigFilter.thenRun(Consumer)
.<V> ConfigNode
<T, V> ConfigNode.withFilter
(ConfigFilter<U, V> filter) Convenience method that returns a new ConfigNode with the provided filter appended onto the current filter usingConfigFilter.withFilter(ConfigFilter)
.Methods in io.github.ttno1.configvalidation with parameters of type ConfigNodeModifier and TypeMethodDescriptionConfigSpec.addNode
(String path, ConfigNode<?, ?> node) Adds the node to this ConfigSpec at the specified path.
Replaces any node that was previously at the specified path.Method parameters in io.github.ttno1.configvalidation with type arguments of type ConfigNodeModifier and TypeMethodDescriptionConfigSpec.addNodes
(Map<String, ConfigNode<?, ?>> nodeMap) Adds the specified nodes to this ConfigSpec at their corresponding paths.
Replaces any nodes that were previously at any specified paths.