Package ninja.leaping.configurate.yaml
Class YAMLConfigurationLoader.Builder
java.lang.Object
ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder<YAMLConfigurationLoader.Builder>
ninja.leaping.configurate.yaml.YAMLConfigurationLoader.Builder
- Enclosing class:
- YAMLConfigurationLoader
public static class YAMLConfigurationLoader.Builder extends AbstractConfigurationLoader.Builder<YAMLConfigurationLoader.Builder>
Builds a
YAMLConfigurationLoader.-
Field Summary
Fields inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, headerMode, sink, source -
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder() -
Method Summary
Modifier and Type Method Description @NonNull YAMLConfigurationLoaderbuild()Builds the loader.@NonNull org.yaml.snakeyaml.DumperOptions.FlowStylegetFlowSyle()Gets the flow style to be used by the resultant loader.intgetIndent()Gets the level of indentation to be used by the resultant loader.@NonNull YAMLConfigurationLoader.BuildersetFlowStyle(@NonNull org.yaml.snakeyaml.DumperOptions.FlowStyle style)Sets the flow style the resultant loader should use.@NonNull YAMLConfigurationLoader.BuildersetIndent(int indent)Sets the level of indentation the resultant loader should use.Methods inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder
getDefaultOptions, getHeaderMode, getSink, getSource, preservesHeader, setDefaultOptions, setDefaultOptions, setFile, setHeaderMode, setPath, setPreservesHeader, setSink, setSource, setURL
-
Constructor Details
-
Method Details
-
setIndent
Sets the level of indentation the resultant loader should use.- Parameters:
indent- The indent level- Returns:
- This builder (for chaining)
-
getIndent
Gets the level of indentation to be used by the resultant loader.- Returns:
- The indent level
-
setFlowStyle
public @NonNull YAMLConfigurationLoader.Builder setFlowStyle(@NonNull org.yaml.snakeyaml.DumperOptions.FlowStyle style)Sets the flow style the resultant loader should use. Flow: the compact, json-like representation.
Example:{value: [list, of, elements], another: value}Block: expanded, traditional YAML
Example:value: - list - of - elements another: value- Parameters:
style- The flow style to use- Returns:
- This builder (for chaining)
-
getFlowSyle
Gets the flow style to be used by the resultant loader.- Returns:
- The flow style
-
build
Description copied from class:AbstractConfigurationLoader.BuilderBuilds the loader.- Specified by:
buildin classAbstractConfigurationLoader.Builder<YAMLConfigurationLoader.Builder>- Returns:
- The loader
-