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 aYAMLConfigurationLoader
.
-
-
Field Summary
-
Fields inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, headerMode, sink, source
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull YAMLConfigurationLoader
build()
Builds the loader.@NonNull org.yaml.snakeyaml.DumperOptions.FlowStyle
getFlowSyle()
Gets the flow style to be used by the resultant loader.int
getIndent()
Gets the level of indentation to be used by the resultant loader.@NonNull YAMLConfigurationLoader.Builder
setFlowStyle(@NonNull org.yaml.snakeyaml.DumperOptions.FlowStyle style)
Sets the flow style the resultant loader should use.@NonNull YAMLConfigurationLoader.Builder
setIndent(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 Detail
-
Builder
protected Builder()
-
-
Method Detail
-
setIndent
public @NonNull YAMLConfigurationLoader.Builder setIndent(int indent)
Sets the level of indentation the resultant loader should use.- Parameters:
indent
- The indent level- Returns:
- This builder (for chaining)
-
getIndent
public int 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
public @NonNull org.yaml.snakeyaml.DumperOptions.FlowStyle getFlowSyle()
Gets the flow style to be used by the resultant loader.- Returns:
- The flow style
-
build
public @NonNull YAMLConfigurationLoader build()
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<YAMLConfigurationLoader.Builder>
- Returns:
- The loader
-
-