Class ConfigFileDataStorage<K,V>
java.lang.Object
me.hsgamer.topper.storage.flat.core.FlatDataStorage<io.github.projectunified.craftconfig.common.Config,K,V>
me.hsgamer.topper.storage.flat.configfile.ConfigFileDataStorage<K,V>
- All Implemented Interfaces:
DataStorage<K,V>
public abstract class ConfigFileDataStorage<K,V>
extends FlatDataStorage<io.github.projectunified.craftconfig.common.Config,K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.hsgamer.topper.storage.core.DataStorage
DataStorage.Modifier<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionConfigFileDataStorage(File baseFolder, String name, FlatValueConverter<K> keyConverter, FlatValueConverter<V> valueConverter) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract io.github.projectunified.craftconfig.common.Configprotected abstract StringgetConfigName(String name) loadFromFile(io.github.projectunified.craftconfig.common.Config file) loadFromFile(io.github.projectunified.craftconfig.common.Config file, String key) protected voidremoveValue(io.github.projectunified.craftconfig.common.Config file, String key) protected voidsaveFile(io.github.projectunified.craftconfig.common.Config file) protected io.github.projectunified.craftconfig.common.Configprotected voidMethods inherited from class me.hsgamer.topper.storage.flat.core.FlatDataStorage
load, load, modify, onRegister, onUnregisterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.topper.storage.core.DataStorage
keys
-
Constructor Details
-
ConfigFileDataStorage
public ConfigFileDataStorage(File baseFolder, String name, FlatValueConverter<K> keyConverter, FlatValueConverter<V> valueConverter)
-
-
Method Details
-
getConfig
-
getConfigName
-
setupFile
protected io.github.projectunified.craftconfig.common.Config setupFile(File baseFolder, String name) - Specified by:
setupFilein classFlatDataStorage<io.github.projectunified.craftconfig.common.Config,K, V>
-
loadFromFile
- Specified by:
loadFromFilein classFlatDataStorage<io.github.projectunified.craftconfig.common.Config,K, V>
-
loadFromFile
protected Optional<String> loadFromFile(io.github.projectunified.craftconfig.common.Config file, String key) - Specified by:
loadFromFilein classFlatDataStorage<io.github.projectunified.craftconfig.common.Config,K, V>
-
saveFile
protected void saveFile(io.github.projectunified.craftconfig.common.Config file) - Specified by:
saveFilein classFlatDataStorage<io.github.projectunified.craftconfig.common.Config,K, V>
-
setValue
protected void setValue(io.github.projectunified.craftconfig.common.Config file, String key, String value) - Specified by:
setValuein classFlatDataStorage<io.github.projectunified.craftconfig.common.Config,K, V>
-
removeValue
- Specified by:
removeValuein classFlatDataStorage<io.github.projectunified.craftconfig.common.Config,K, V>
-