Package me.hsgamer.hscore.config.gson
Class GsonConfig
java.lang.Object
me.hsgamer.hscore.config.gson.GsonConfig
- All Implemented Interfaces:
Config
The
Config implementation for Gson-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGsonConfig(File file) Create a new configGsonConfig(File file, com.google.gson.Gson gson) Create a new config -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Remove all paths from the configurationGet the value from the pathgetName()Get the name of the configurationcom.google.gson.JsonObjectGet the original instanceGet all values from the pathbooleanisNormalizable(Object object) Check if the object is normalizableNormalize the library-specific objectvoidreload()Reload the configurationvoidsave()Save the configurationvoidSet the value to the pathvoidsetup()Set up the configurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.config.Config
contains, get, getComment, getComment, getInstance, getInstance, getKeys, getNormalized, getNormalized, getNormalizedValues, isInstance, normalizeObject, remove, setComment, setComment, setIfAbsent, setIfAbsent
-
Constructor Details
-
GsonConfig
Create a new config- Parameters:
file- the filegson- the Gson instance
-
GsonConfig
Create a new config- Parameters:
file- the file
-
-
Method Details
-
getOriginal
public com.google.gson.JsonObject getOriginal()Description copied from interface:ConfigGet the original instance- Specified by:
getOriginalin interfaceConfig- Returns:
- the original instance
-
get
Description copied from interface:ConfigGet the value from the path -
set
Description copied from interface:ConfigSet the value to the path -
clear
public void clear()Description copied from interface:ConfigRemove all paths from the configuration -
getName
Description copied from interface:ConfigGet the name of the configuration -
getValues
Description copied from interface:ConfigGet all values from the path -
setup
public void setup()Description copied from interface:ConfigSet up the configuration -
save
public void save()Description copied from interface:ConfigSave the configuration -
reload
public void reload()Description copied from interface:ConfigReload the configuration -
normalize
Description copied from interface:ConfigNormalize the library-specific object -
isNormalizable
Description copied from interface:ConfigCheck if the object is normalizable- Specified by:
isNormalizablein interfaceConfig- Parameters:
object- the object- Returns:
- true if it is
-