Package ninja.leaping.configurate.gson
Class GsonConfigurationLoader.Builder
- java.lang.Object
-
- ninja.leaping.configurate.gson.GsonConfigurationLoader.Builder
-
- Enclosing class:
- GsonConfigurationLoader
public static class GsonConfigurationLoader.Builder extends Object
Builds aGsonConfigurationLoader
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull GsonConfigurationLoader
build()
int
getIndent()
Gets the level of indentation to be used by the resultant loader.boolean
isLenient()
Gets if the resultant loader should parse leniently.@NonNull GsonConfigurationLoader.Builder
setIndent(int indent)
Sets the level of indentation the resultant loader should use.@NonNull GsonConfigurationLoader.Builder
setLenient(boolean lenient)
Sets if the resultant loader should parse leniently.
-
-
-
Constructor Detail
-
Builder
protected Builder()
-
-
Method Detail
-
setIndent
public @NonNull GsonConfigurationLoader.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
-
setLenient
public @NonNull GsonConfigurationLoader.Builder setLenient(boolean lenient)
Sets if the resultant loader should parse leniently.- Parameters:
lenient
- Whether the parser should parse leniently- Returns:
- This builder (for chaining)
- See Also:
JsonReader.setLenient(boolean)
-
isLenient
public boolean isLenient()
Gets if the resultant loader should parse leniently.- Returns:
- Whether the parser should parse leniently
-
build
public @NonNull GsonConfigurationLoader build()
-
-