Package ninja.leaping.configurate.yaml
Class YAMLConfigurationLoader.Builder
- java.lang.Object
-
- ninja.leaping.configurate.yaml.YAMLConfigurationLoader.Builder
-
- Enclosing class:
- YAMLConfigurationLoader
public static class YAMLConfigurationLoader.Builder extends Object
Builds aYAMLConfigurationLoader.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull YAMLConfigurationLoaderbuild()@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.
-
-
-
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()
-
-