Class MemorySectionMethods<T extends AbstractMemorySection<?>>
java.lang.Object
com.kamikazejam.kamicommon.yaml.AbstractMemorySection<T>
com.kamikazejam.kamicommon.yaml.base.MemorySectionMethods<T>
- Direct Known Subclasses:
MemorySectionStandalone
public abstract class MemorySectionMethods<T extends AbstractMemorySection<?>>
extends AbstractMemorySection<T>
-
Constructor Summary
ConstructorsConstructorDescriptionMemorySectionMethods
(@Nullable org.yaml.snakeyaml.nodes.MappingNode node, @Nullable ConfigurationMethods<?> parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefault
(String key, Object o) boolean
getBigDecimal
(String key) getBigDecimal
(String key, BigDecimal def) boolean
getBoolean
(String key) boolean
getBoolean
(String key, boolean def) byte
byte
getByteList
(String key) getByteList
(String key, List<Byte> def) double
double
float
float
int
int
getIntegerList
(String key) getIntegerList
(String key, List<Integer> def) getKeys
(boolean deep) Returns the keys of the config If Deep is enabled, it will dig and find all valid keys that resolve to a valueList<?>
List<?>
long
long
short
short
getStringList
(String key) getStringList
(String key, List<String> def) boolean
boolean
boolean
boolean
boolean
isEmpty()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
putBoolean
(String key, boolean value) void
void
void
void
void
putInteger
(String key, int value) void
void
void
boolean
Saves the config to the fileboolean
Saves the config to the filevoid
setBoolean
(String key, boolean value) void
void
void
void
void
setInteger
(String key, int value) void
void
void
Methods inherited from class com.kamikazejam.kamicommon.yaml.AbstractMemorySection
contains, getKeyNode, getKeys, getNode, getNodeTuple, getNodeValue, getObject, internalPut, isPrimitiveWrapper, parseBigDecimal, put, set, setChanged
-
Constructor Details
-
MemorySectionMethods
public MemorySectionMethods(@Nullable @Nullable org.yaml.snakeyaml.nodes.MappingNode node, @Nullable @Nullable ConfigurationMethods<?> parent)
-
-
Method Details
-
get
-
get
-
putString
-
setString
-
putBoolean
-
setBoolean
-
putInteger
-
putInt
-
setInteger
-
setInt
-
putLong
-
setLong
-
putDouble
-
setDouble
-
putFloat
-
setFloat
-
putByte
-
setByte
-
putShort
-
setShort
-
getString
-
getString
-
isString
-
getBoolean
-
getBoolean
-
isBoolean
-
getByte
-
getByte
-
isByte
-
getShort
-
getShort
-
isShort
-
getInt
-
getInt
-
isInt
-
getLong
-
getLong
-
isLong
-
getFloat
-
getFloat
-
isFloat
-
getDouble
-
getDouble
-
isDouble
-
getBigDecimal
-
getBigDecimal
-
isNumber
-
getList
-
getList
-
isList
-
getStringList
-
getStringList
-
getIntegerList
-
getIntegerList
-
getByteList
-
getByteList
-
getKeys
Returns the keys of the config If Deep is enabled, it will dig and find all valid keys that resolve to a value- Parameters:
deep
- Whether to search for all sub-keys- Returns:
- The list of keys found
-
isConfigurationSection
-
contains
-
isSet
-
addDefault
-
isEmpty
public boolean isEmpty() -
save
Saves the config to the file- Returns:
- true IFF the config was saved successfully (can be skipped if the config is not changed)
-
save
Saves the config to the file- Parameters:
force
- If the config should be saved even if no changes were made- Returns:
- true IFF the config was saved successfully (can be skipped if the config is not changed and force is false)
-