Class RootNode
java.lang.Object
com.github.mizool.core.configuration.RootNode
- All Implemented Interfaces:
HasChildren
The root node of a set of properties.
-
Method Summary
Modifier and TypeMethodDescriptionadd(InputStream inputStream, Charset charset) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UseSources.join(Source, Source)together withSources.from(Properties)insteadReturns the childPropertyNodewith the given name.toString()
-
Method Details
-
child
Description copied from interface:HasChildrenReturns the childPropertyNodewith the given name. Until a value is retrieved, no check is made for the existence of any property.
Example: For a node representingtimeouts.network, callingchild("connect")will return a node representingtimeouts.network.connect.- Specified by:
childin interfaceHasChildren- Parameters:
key- one or more segments of the key to append to the key of the current node- Returns:
- the child or descendant node, never
null.
-
add
Deprecated, for removal: This API element is subject to removal in a future version.UseSources.join(Source, Source)together withSources.from(Properties)insteadCreates a new root node that incorporates the current node's properties and the ones loaded from the given reader. For keys present in both sets of data, the ones fromreadertake precedence.- Parameters:
reader- the reader to load from- Throws:
UncheckedIOException- if reading failed
-
add
@Deprecated(since="8.3", forRemoval=true) public RootNode add(InputStream inputStream, Charset charset) Deprecated, for removal: This API element is subject to removal in a future version.UseSources.join(Source, Source)together withSources.from(InputStream, Charset)insteadCreates a new root node that incorporates the current node's properties and the ones loaded from the given input stream. For keys present in both sets of data, the ones frominputStreamtake precedence.- Parameters:
inputStream- the input stream to load fromcharset- the charset to use- Throws:
UncheckedIOException- if reading failed
-
toString
-
Sources.join(Source, Source)together withSources.from(InputStream, Charset)instead