类 ConfigureSource<SECTION extends ConfigureSection,ORIGINAL,SELF extends ConfigureSource<SECTION,ORIGINAL,SELF>>
- 类型参数:
SECTION- The type of the root section.ORIGINAL- The original configuration object.SELF- The type of the source itself, for further implement support.
- 所有已实现的接口:
ConfigureSection
- 直接已知子类:
FileConfigSource
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器限定符构造器说明protectedConfigureSource(@NotNull ConfigurationHolder<? extends SELF> holder, long lastUpdateMillis) -
方法概要
修饰符和类型方法说明asMap()Get this section as a map.@NotNull ConfigureSectioncreateSection(@NotNull String path, @NotNull Map<?, ?> data) Creates a newConfigureSectionwith specified values.@Nullable ObjectGet the origin value of the path.getKeys(boolean deep) Gets a set containing all keys in this section.longgetValues(boolean deep) Gets a set containing all values in this section.@NotNull ConfigurationHolder<? extends SELF>holder()booleanisExpired(long parsedTime) protected abstract voidonReload()Reload the configuration.abstract ORIGINALoriginal()@Nullable ConfigureSectionparent()Source also represents the root section, so it has no parent@NotNull Stringpath()Get the current section's path fromConfigureSection.parent()of this section.charGet the path separator for the section.voidreload()voidRemoves the value at the given path.abstract voidsave()Save the whole configuration.abstract SECTIONsection()protected abstract SELFself()voidSets the value at the given path.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cc.carm.lib.configuration.source.section.ConfigureSection
childPath, computeSection, computeSection, computeSection, computeSection, contains, containsValue, createSection, createSection, createSection, forEach, fullPath, get, get, get, get, getBoolean, getBoolean, getByte, getByte, getByteList, getChar, getChar, getCharList, getCollection, getDouble, getDouble, getDoubleList, getFloat, getFloat, getFloatList, getInt, getInt, getIntegerList, getList, getList, getLong, getLong, getLongList, getSection, getShort, getShort, getString, getString, getStringList, isBoolean, isByte, isChar, isDouble, isEmpty, isFloat, isInt, isList, isLong, isRoot, isSection, isShort, isString, isType, keys, size, stream, stream, stream, values
-
字段详细资料
-
holder
@NotNull protected final @NotNull ConfigurationHolder<? extends SELF extends ConfigureSource<SECTION,ORIGINAL, holderSELF>> -
lastUpdateMillis
protected long lastUpdateMillis
-
-
构造器详细资料
-
ConfigureSource
protected ConfigureSource(@NotNull @NotNull ConfigurationHolder<? extends SELF> holder, long lastUpdateMillis)
-
-
方法详细资料
-
holder
-
reload
- 抛出:
Exception
-
self
-
original
- 返回:
- The original configuration object.
-
section
- 返回:
- The root
ConfigureSection, which represents the entire configuration.
-
save
Save the whole configuration.- 抛出:
Exception- If any error occurs while saving.
-
onReload
Reload the configuration.
This used for implementation, for external usage, usereload()- 抛出:
Exception- If any error occurs while reloading.
-
pathSeparator
public char pathSeparator()从接口复制的说明:ConfigureSectionGet the path separator for the section.- 指定者:
pathSeparator在接口中ConfigureSection- 返回:
- The path separator
-
getLastUpdateMillis
public long getLastUpdateMillis() -
isExpired
public boolean isExpired(long parsedTime) -
parent
Source also represents the root section, so it has no parent- 指定者:
parent在接口中ConfigureSection- 返回:
- null
-
path
从接口复制的说明:ConfigureSectionGet the current section's path fromConfigureSection.parent()of this section.- 指定者:
path在接口中ConfigureSection- 返回:
- The current path of this section, if
ConfigureSection.isRoot(), return empty string.
-
getValues
从接口复制的说明:ConfigureSectionGets a set containing all values in this section.If deep is set to true, then this will contain all the keys within any child
ConfigureSections (and their children paths).If deep is set to false, then this will contain only the keys of any direct children, and not their own children.
- 指定者:
getValues在接口中ConfigureSection- 参数:
deep- Whether to get a deep list.- 返回:
- Map of data values contained within this Section.
-
getKeys
从接口复制的说明:ConfigureSectionGets a set containing all keys in this section.If deep is set to true, then this will contain all the keys within any child
ConfigureSections (and their children paths).If deep is set to false, then this will contain only the keys of any direct children, and not their own children.
- 指定者:
getKeys在接口中ConfigureSection- 参数:
deep- Whether to get a deep list.- 返回:
- Set of keys contained within this Section.
-
asMap
从接口复制的说明:ConfigureSectionGet this section as a map.In this map, child
ConfigureSections will also be represented asMaps.- 指定者:
asMap在接口中ConfigureSection- 返回:
- Map of data values contained within this Section.
-
createSection
@NotNull public @NotNull ConfigureSection createSection(@NotNull @NotNull String path, @NotNull @NotNull Map<?, ?> data) 从接口复制的说明:ConfigureSectionCreates a newConfigureSectionwith specified values.The
ConfigureSection.parent()of the new section will be this section.This section will not be saved until
ConfigureSection.set(String, Object)is called.If you want to create and use a section and set it to this section, use
ConfigureSection.computeSection(String).- 指定者:
createSection在接口中ConfigureSectiondata- The data to be used to create section.- 返回:
- Newly created section
-
set
从接口复制的说明:ConfigureSectionSets the value at the given path.Null values will be kept, if you want to remove a value use
ConfigureSection.remove(String)Path separator depends on holder'sStandardOptions.PATH_SEPARATOR- 指定者:
set在接口中ConfigureSection- 参数:
path- The path to set the value at.value- The value to set.
-
remove
从接口复制的说明:ConfigureSectionRemoves the value at the given path.Path separator depends on holder's
StandardOptions.PATH_SEPARATOR- 指定者:
remove在接口中ConfigureSection- 参数:
path- The path to remove the value at.
-
get
从接口复制的说明:ConfigureSectionGet the origin value of the path.- 指定者:
get在接口中ConfigureSection- 参数:
path- The path to get the value from.- 返回:
- The value at the path, or null if not found.
-