Class BaseConfig.MapConfigSection
java.lang.Object
fr.hytale.loader.config.BaseConfig.MapConfigSection
- All Implemented Interfaces:
ConfigSection
- Enclosing class:
BaseConfig
Inner class for config sections backed by a Map.
Provides a ConfigSection view over a standard Map, allowing
identical access patterns for nested data.
- Since:
- 1.0.4
- Version:
- 1.0.4
- Author:
- HytaleLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a value exists in this section.Gets a value from this section.Gets a value from this section with a default.booleangetBoolean(String path) Gets a boolean from this section.booleangetBoolean(String path, boolean def) Gets a boolean from this section with a default.doubleGets a double from this section.doubleGets a double from this section with a default.intGets an int from this section.intGets an int from this section with a default.getKeys(boolean deep) Gets keys from this section.getSection(String path) Gets a nested section from this section.Gets a String from this section.Gets a String from this section with a default.Gets the values of this section as a Map.
-
Constructor Details
-
MapConfigSection
-
-
Method Details
-
get
Gets a value from this section.- Specified by:
getin interfaceConfigSection- Parameters:
path- the path relative to this section- Returns:
- the value, or null
-
get
Gets a value from this section with a default.- Specified by:
getin interfaceConfigSection- Parameters:
path- the path relative to this sectiondef- the default value- Returns:
- the value, or default
-
getString
Gets a String from this section.- Specified by:
getStringin interfaceConfigSection- Parameters:
path- the path relative to this section- Returns:
- the string value
-
getString
Gets a String from this section with a default.- Specified by:
getStringin interfaceConfigSection- Parameters:
path- the path relative to this sectiondef- the default string- Returns:
- the string value, or default
-
getInt
Gets an int from this section.- Specified by:
getIntin interfaceConfigSection- Parameters:
path- the path relative to this section- Returns:
- the int value
-
getInt
Gets an int from this section with a default.- Specified by:
getIntin interfaceConfigSection- Parameters:
path- the path relative to this sectiondef- the default int- Returns:
- the int value, or default
-
getDouble
Gets a double from this section.- Specified by:
getDoublein interfaceConfigSection- Parameters:
path- the path relative to this section- Returns:
- the double value
-
getDouble
Gets a double from this section with a default.- Specified by:
getDoublein interfaceConfigSection- Parameters:
path- the path relative to this sectiondef- the default double- Returns:
- the double value, or default
-
getBoolean
Gets a boolean from this section.- Specified by:
getBooleanin interfaceConfigSection- Parameters:
path- the path relative to this section- Returns:
- the boolean value
-
getBoolean
Gets a boolean from this section with a default.- Specified by:
getBooleanin interfaceConfigSection- Parameters:
path- the path relative to this sectiondef- the default boolean- Returns:
- the boolean value, or default
-
getSection
Gets a nested section from this section.- Specified by:
getSectionin interfaceConfigSection- Parameters:
path- the path to the nested section- Returns:
- the nested ConfigSection, or null
-
getKeys
Gets keys from this section.- Specified by:
getKeysin interfaceConfigSection- Parameters:
deep- if true, includes recursive keys- Returns:
- a Set of keys
-
getValues
Gets the values of this section as a Map.- Specified by:
getValuesin interfaceConfigSection- Returns:
- a Map of the section's data
-
contains
Checks if a value exists in this section.- Specified by:
containsin interfaceConfigSection- Parameters:
path- the path to check- Returns:
- true if found
-