-
- 所有已知子接口:
Configuration
- 所有已知实现类:
JsonConfiguration
,MemoryConfiguration
,MemoryConfigurationSection
,PropertiesConfiguration
,YamlConfiguration
public interface ConfigurationSection
-
-
方法概要
修饰符和类型 方法 说明 default boolean
booleanV(String path)
boolean
booleanV(String path, boolean def)
default byte
byteV(String path)
byte
byteV(String path, byte def)
default char
charV(String path)
char
charV(String path, char def)
ConfigurationSection
clear()
Clear section values.ConfigurationSection
clearSplitter()
MakehasCurrentSplitter()
return false.@NotNull ConfigurationSection
clone()
default @NotNull ConfigurationSection
copy()
Clone current section.default double
doubleV(String path)
double
doubleV(String path, double def)
boolean
exists(String path)
Check this path has ot no vale.default float
floatV(String path)
float
floatV(String path, float def)
boolean
hasCurrentSplitter()
Check current context has splitter.default int
intV(String path)
int
intV(String path, int def)
@NotNull Set<String>
keys()
Get the keys of current section.default List<Object>
list(String path)
List<Object>
list(String path, Supplier<List<Object>> def)
default long
longV(String path)
long
longV(String path, long def)
ConfigurationSection
merge(ConfigurationSection section)
Merge other section@NotNull ConfigurationSection
newContext()
Create a new context / Create a Pointer.default Number
number(String path)
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.default ConfigurationSection
root()
default ConfigurationSection
section(String path)
Same assectionIfExist(String)
default ConfigurationSection
sectionIfExist(String path)
Get sub section.@NotNull ConfigurationSection
sectionOrCreate(String path)
ConfigurationSection
set(String path, Object value)
Set the value to ConfigurationSection.default short
shortV(String path)
short
shortV(String path, short def)
default String
string(String path)
default String
string(String path, String def)
String
string(String path, Supplier<String> def)
default List<String>
stringList(String path)
List<String>
stringList(String path, Supplier<List<String>> def)
static String
toStr(ConfigurationSection cs)
boolean
useSplitter()
Does current context using splitter.ConfigurationSection
useSplitter(boolean use)
Set current context using splitterdefault Object
value(String path)
default Object
value(String path, Object def)
Object
value(String path, Supplier<Object> def)
Get the value of path.Map<String,Object>
values()
Get un-editable values.
-
-
-
方法详细资料
-
merge
ConfigurationSection merge(ConfigurationSection section)
Merge other section- 参数:
section
- The target.- 返回:
- this.
-
pathSplitter
char pathSplitter()
The splitter using.- 返回:
- The path splitter.
-
pathSplitter
ConfigurationSection pathSplitter(char splitter)
Change using splitter. And makehasCurrentSplitter()
return true.Has no effect on
newContext()
and parentConfigurationSection
- 参数:
splitter
- The splitter change.- 返回:
- this.
-
useSplitter
boolean useSplitter()
Does current context using splitter.- 返回:
- true if using splitter.
-
hasCurrentSplitter
boolean hasCurrentSplitter()
Check current context has splitter.- 返回:
- true if parent is null or
clearSplitter()
invoked.
-
clearSplitter
ConfigurationSection clearSplitter()
MakehasCurrentSplitter()
return false. This method has no effect if parent is null.- 返回:
- this
-
useSplitter
ConfigurationSection useSplitter(boolean use)
Set current context using splitter- 参数:
use
- Is using.- 返回:
- this.
-
intV
int intV(String path, int def)
-
intV
default int intV(String path)
-
exists
boolean exists(String path)
Check this path has ot no vale.- 参数:
path
- The path checking.- 返回:
- true if path exists.
-
value
Object value(String path, Supplier<Object> def)
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);
- 参数:
path
- The path.def
- Default value supplier- 返回:
- The result value.
-
shortV
short shortV(String path, short def)
-
shortV
default short shortV(String path)
-
byteV
byte byteV(String path, byte def)
-
byteV
default byte byteV(String path)
-
charV
default char charV(String path)
-
charV
char charV(String path, char def)
-
floatV
float floatV(String path, float def)
-
floatV
default float floatV(String path)
-
doubleV
double doubleV(String path, double def)
-
doubleV
default double doubleV(String path)
-
booleanV
boolean booleanV(String path, boolean def)
-
booleanV
default boolean booleanV(String path)
-
longV
long longV(String path, long def)
-
longV
default long longV(String path)
-
set
ConfigurationSection set(String path, Object value)
Set the value to ConfigurationSection. This will also affect the values innewContext()
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)
- 参数:
path
- The path set.value
- The value.- 返回:
- this
-
remove
ConfigurationSection remove(String path)
Remove a value.- 参数:
path
- The path.- 返回:
- this.
-
sectionIfExist
default ConfigurationSection sectionIfExist(String path)
Get sub section.- 参数:
path
- The section path.- 返回:
- Sub Section.(if exist)
-
sectionOrCreate
@NotNull @NotNull ConfigurationSection sectionOrCreate(String path)
-
section
default ConfigurationSection section(String path)
Same assectionIfExist(String)
- 参数:
path
- The path- 返回:
- Sub Section
-
newContext
@NotNull @NotNull ConfigurationSection newContext()
Create a new context / Create a Pointer.- 返回:
- The pointer created.
-
copy
@NotNull default @NotNull ConfigurationSection copy()
Clone current section. Result no parent.- 返回:
- Cloned Section.
-
clone
@NotNull @NotNull ConfigurationSection clone()
-
clear
ConfigurationSection clear()
Clear section values.- 返回:
- this.
-
toStr
static String toStr(ConfigurationSection cs)
-
parent
ConfigurationSection parent()
Get parent.- 返回:
- The parent
-
root
default ConfigurationSection root()
-
parent
ConfigurationSection parent(ConfigurationSection parent)
Set parent if absent.- 参数:
parent
- The target.- 返回:
- this.
-
-