- java.lang.Object
-
- cn.mcres.karlatemp.mxlib.config.MemoryConfigurationSection
-
- 所有已实现的接口:
ConfigurationSection
- 直接已知子类:
MemoryConfiguration
public class MemoryConfigurationSection extends Object implements ConfigurationSection
-
-
构造器概要
构造器 构造器 说明 MemoryConfigurationSection()MemoryConfigurationSection(@NotNull Map<String,Object> values)
-
方法概要
修饰符和类型 方法 说明 booleanbooleanV(String path, boolean def)bytebyteV(String path, byte def)charcharV(String path, char def)ConfigurationSectionclear()Clear section values.ConfigurationSectionclearSplitter()MakeConfigurationSection.hasCurrentSplitter()return false.@NotNull ConfigurationSectionclone()doubledoubleV(String path, double def)booleanexists(String path)Check this path has ot no vale.floatfloatV(String path, float def)booleanhasCurrentSplitter()Check current context has splitter.intintV(String path, int def)@NotNull Set<String>keys()Get the keys of current section.List<Object>list(String path, Supplier<List<Object>> def)longlongV(String path, long def)ConfigurationSectionmerge(ConfigurationSection section)Merge other section@NotNull MemoryConfigurationSectionnewContext()Create a new context / Create a Pointer.Numbernumber(String path, Number def)ConfigurationSectionparent()Get parent.ConfigurationSectionparent(ConfigurationSection parent)Set parent if absent.charpathSplitter()The splitter using.ConfigurationSectionpathSplitter(char splitter)Change using splitter.ConfigurationSectionremove(String path)Remove a value.@NotNull ConfigurationSectionsectionOrCreate(String path)ConfigurationSectionset(String path, Object value)Set the value to ConfigurationSection.shortshortV(String path, short def)Deque<String>split(String path)Stringstring(String path, Supplier<String> def)List<String>stringList(String path, Supplier<List<String>> def)StringtoString()booleanuseSplitter()Does current context using splitter.ConfigurationSectionuseSplitter(boolean use)Set current context using splitterObjectvalue(String path, Supplier<Object> def)Get the value of path.Map<String,Object>values()Get un-editable values.
-
-
-
方法详细资料
-
clearSplitter
public ConfigurationSection clearSplitter()
从接口复制的说明:ConfigurationSectionMakeConfigurationSection.hasCurrentSplitter()return false. This method has no effect if parent is null.- 指定者:
clearSplitter在接口中ConfigurationSection- 返回:
- this
-
hasCurrentSplitter
public boolean hasCurrentSplitter()
从接口复制的说明:ConfigurationSectionCheck current context has splitter.- 指定者:
hasCurrentSplitter在接口中ConfigurationSection- 返回:
- true if parent is null or
ConfigurationSection.clearSplitter()invoked.
-
parent
public ConfigurationSection parent()
从接口复制的说明:ConfigurationSectionGet parent.- 指定者:
parent在接口中ConfigurationSection- 返回:
- The parent
-
parent
public ConfigurationSection parent(ConfigurationSection parent)
从接口复制的说明:ConfigurationSectionSet parent if absent.- 指定者:
parent在接口中ConfigurationSection- 参数:
parent- The target.- 返回:
- this.
-
merge
public ConfigurationSection merge(ConfigurationSection section)
从接口复制的说明:ConfigurationSectionMerge other section- 指定者:
merge在接口中ConfigurationSection- 参数:
section- The target.- 返回:
- this.
-
pathSplitter
public char pathSplitter()
从接口复制的说明:ConfigurationSectionThe splitter using.- 指定者:
pathSplitter在接口中ConfigurationSection- 返回:
- The path splitter.
-
pathSplitter
public ConfigurationSection pathSplitter(char splitter)
从接口复制的说明:ConfigurationSectionChange using splitter. And makeConfigurationSection.hasCurrentSplitter()return true.Has no effect on
ConfigurationSection.newContext()and parentConfigurationSection- 指定者:
pathSplitter在接口中ConfigurationSection- 参数:
splitter- The splitter change.- 返回:
- this.
-
useSplitter
public boolean useSplitter()
从接口复制的说明:ConfigurationSectionDoes current context using splitter.- 指定者:
useSplitter在接口中ConfigurationSection- 返回:
- true if using splitter.
-
useSplitter
public ConfigurationSection useSplitter(boolean use)
从接口复制的说明:ConfigurationSectionSet current context using splitter- 指定者:
useSplitter在接口中ConfigurationSection- 参数:
use- Is using.- 返回:
- this.
-
string
public String string(String path, Supplier<String> def)
- 指定者:
string在接口中ConfigurationSection
-
list
public List<Object> list(String path, Supplier<List<Object>> def)
- 指定者:
list在接口中ConfigurationSection
-
stringList
public List<String> stringList(String path, Supplier<List<String>> def)
- 指定者:
stringList在接口中ConfigurationSection
-
intV
public int intV(String path, int def)
- 指定者:
intV在接口中ConfigurationSection
-
exists
public boolean exists(String path)
从接口复制的说明:ConfigurationSectionCheck this path has ot no vale.- 指定者:
exists在接口中ConfigurationSection- 参数:
path- The path checking.- 返回:
- true if path exists.
-
value
public Object value(String path, Supplier<Object> def)
从接口复制的说明:ConfigurationSectionGet the value of path. If you want to get value with Target Path Contains splitter. Use this:Object value = section.newContext().useSplitter(false).value(PATH, null);- 指定者:
value在接口中ConfigurationSection- 参数:
path- The path.def- Default value supplier- 返回:
- The result value.
-
shortV
public short shortV(String path, short def)
- 指定者:
shortV在接口中ConfigurationSection
-
byteV
public byte byteV(String path, byte def)
- 指定者:
byteV在接口中ConfigurationSection
-
charV
public char charV(String path, char def)
- 指定者:
charV在接口中ConfigurationSection
-
floatV
public float floatV(String path, float def)
- 指定者:
floatV在接口中ConfigurationSection
-
doubleV
public double doubleV(String path, double def)
- 指定者:
doubleV在接口中ConfigurationSection
-
booleanV
public boolean booleanV(String path, boolean def)
- 指定者:
booleanV在接口中ConfigurationSection
-
longV
public long longV(String path, long def)
- 指定者:
longV在接口中ConfigurationSection
-
number
public Number number(String path, Number def)
- 指定者:
number在接口中ConfigurationSection
-
set
public ConfigurationSection set(String path, Object value)
从接口复制的说明:ConfigurationSectionSet the value to ConfigurationSection. This will also affect the values inConfigurationSection.newContext()WARNING: If root (Configuration) unsupported this value. Then will throw a Exception in
Configuration.store(OutputStream)Configuration.store(java.io.Writer)Configuration.store(File)Configuration.store(Path)- 指定者:
set在接口中ConfigurationSection- 参数:
path- The path set.value- The value.- 返回:
- this
-
remove
public ConfigurationSection remove(String path)
从接口复制的说明:ConfigurationSectionRemove a value.- 指定者:
remove在接口中ConfigurationSection- 参数:
path- The path.- 返回:
- this.
-
sectionOrCreate
@NotNull public @NotNull ConfigurationSection sectionOrCreate(String path)
- 指定者:
sectionOrCreate在接口中ConfigurationSection
-
keys
@NotNull public @NotNull Set<String> keys()
从接口复制的说明:ConfigurationSectionGet the keys of current section.- 指定者:
keys在接口中ConfigurationSection- 返回:
- keys.
-
newContext
@NotNull public @NotNull MemoryConfigurationSection newContext()
从接口复制的说明:ConfigurationSectionCreate a new context / Create a Pointer.- 指定者:
newContext在接口中ConfigurationSection- 返回:
- The pointer created.
-
clone
@NotNull public @NotNull ConfigurationSection clone()
- 指定者:
clone在接口中ConfigurationSection
-
clear
public ConfigurationSection clear()
从接口复制的说明:ConfigurationSectionClear section values.- 指定者:
clear在接口中ConfigurationSection- 返回:
- this.
-
values
public Map<String,Object> values()
从接口复制的说明:ConfigurationSectionGet un-editable values.- 指定者:
values在接口中ConfigurationSection- 返回:
- The values of this section.
-
-