- 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)
-
方法概要
修饰符和类型 方法 说明 boolean
booleanV(String path, boolean def)
byte
byteV(String path, byte def)
char
charV(String path, char def)
ConfigurationSection
clear()
Clear section values.ConfigurationSection
clearSplitter()
MakeConfigurationSection.hasCurrentSplitter()
return false.@NotNull ConfigurationSection
clone()
double
doubleV(String path, double def)
boolean
exists(String path)
Check this path has ot no vale.float
floatV(String path, float def)
boolean
hasCurrentSplitter()
Check current context has splitter.int
intV(String path, int def)
@NotNull Set<String>
keys()
Get the keys of current section.List<Object>
list(String path, Supplier<List<Object>> def)
long
longV(String path, long def)
ConfigurationSection
merge(ConfigurationSection section)
Merge other section@NotNull MemoryConfigurationSection
newContext()
Create a new context / Create a Pointer.Number
number(String path, Number def)
ConfigurationSection
parent()
Get parent.ConfigurationSection
parent(ConfigurationSection parent)
Set parent if absent.char
pathSplitter()
The splitter using.ConfigurationSection
pathSplitter(char splitter)
Change using splitter.ConfigurationSection
remove(String path)
Remove a value.@NotNull ConfigurationSection
sectionOrCreate(String path)
ConfigurationSection
set(String path, Object value)
Set the value to ConfigurationSection.short
shortV(String path, short def)
Deque<String>
split(String path)
String
string(String path, Supplier<String> def)
List<String>
stringList(String path, Supplier<List<String>> def)
String
toString()
boolean
useSplitter()
Does current context using splitter.ConfigurationSection
useSplitter(boolean use)
Set current context using splitterObject
value(String path, Supplier<Object> def)
Get the value of path.Map<String,Object>
values()
Get un-editable values.
-
-
-
方法详细资料
-
clearSplitter
public ConfigurationSection clearSplitter()
从接口复制的说明:ConfigurationSection
MakeConfigurationSection.hasCurrentSplitter()
return false. This method has no effect if parent is null.- 指定者:
clearSplitter
在接口中ConfigurationSection
- 返回:
- this
-
hasCurrentSplitter
public boolean hasCurrentSplitter()
从接口复制的说明:ConfigurationSection
Check current context has splitter.- 指定者:
hasCurrentSplitter
在接口中ConfigurationSection
- 返回:
- true if parent is null or
ConfigurationSection.clearSplitter()
invoked.
-
parent
public ConfigurationSection parent()
从接口复制的说明:ConfigurationSection
Get parent.- 指定者:
parent
在接口中ConfigurationSection
- 返回:
- The parent
-
parent
public ConfigurationSection parent(ConfigurationSection parent)
从接口复制的说明:ConfigurationSection
Set parent if absent.- 指定者:
parent
在接口中ConfigurationSection
- 参数:
parent
- The target.- 返回:
- this.
-
merge
public ConfigurationSection merge(ConfigurationSection section)
从接口复制的说明:ConfigurationSection
Merge other section- 指定者:
merge
在接口中ConfigurationSection
- 参数:
section
- The target.- 返回:
- this.
-
pathSplitter
public char pathSplitter()
从接口复制的说明:ConfigurationSection
The splitter using.- 指定者:
pathSplitter
在接口中ConfigurationSection
- 返回:
- The path splitter.
-
pathSplitter
public ConfigurationSection pathSplitter(char splitter)
从接口复制的说明:ConfigurationSection
Change 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()
从接口复制的说明:ConfigurationSection
Does current context using splitter.- 指定者:
useSplitter
在接口中ConfigurationSection
- 返回:
- true if using splitter.
-
useSplitter
public ConfigurationSection useSplitter(boolean use)
从接口复制的说明:ConfigurationSection
Set 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)
从接口复制的说明:ConfigurationSection
Check 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)
从接口复制的说明:ConfigurationSection
Get 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)
从接口复制的说明:ConfigurationSection
Set 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)
从接口复制的说明:ConfigurationSection
Remove 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()
从接口复制的说明:ConfigurationSection
Get the keys of current section.- 指定者:
keys
在接口中ConfigurationSection
- 返回:
- keys.
-
newContext
@NotNull public @NotNull MemoryConfigurationSection newContext()
从接口复制的说明:ConfigurationSection
Create a new context / Create a Pointer.- 指定者:
newContext
在接口中ConfigurationSection
- 返回:
- The pointer created.
-
clone
@NotNull public @NotNull ConfigurationSection clone()
- 指定者:
clone
在接口中ConfigurationSection
-
clear
public ConfigurationSection clear()
从接口复制的说明:ConfigurationSection
Clear section values.- 指定者:
clear
在接口中ConfigurationSection
- 返回:
- this.
-
values
public Map<String,Object> values()
从接口复制的说明:ConfigurationSection
Get un-editable values.- 指定者:
values
在接口中ConfigurationSection
- 返回:
- The values of this section.
-
-