public interface ConfigSection
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String key)
Check existence of config section element
|
boolean |
exists(String key,
boolean ignoreCase)
Check existence of config section element
|
Object |
get(String key)
Get object by key.
|
<T> T |
get(String key,
T defaultValue)
Get object by key.
|
ConfigSection |
getAll()
Get new instance of config section
|
Map<String,Object> |
getAllMap()
Get root section as LinkedHashMap
|
boolean |
getBoolean(String key)
Get boolean value of config section element
|
boolean |
getBoolean(String key,
boolean defaultValue)
Get boolean value of config section element
|
List<Boolean> |
getBooleanList(String key)
Get Boolean List value of config section element
|
List<Byte> |
getByteList(String key)
Get Byte List value of config section element
|
List<Character> |
getCharacterList(String key)
Get Character List value of config section element
|
double |
getDouble(String key)
Get double value of config section element
|
double |
getDouble(String key,
double defaultValue)
Get double value of config section element
|
List<Double> |
getDoubleList(String key)
Get Double List value of config section element
|
List<Float> |
getFloatList(String key)
Get Float List value of config section element
|
int |
getInt(String key)
Get int value of config section element
|
int |
getInt(String key,
int defaultValue)
Get int value of config section element
|
List<Integer> |
getIntegerList(String key)
Get Integer List value of config section element
|
Set<String> |
getKeys()
Get all keys
|
Set<String> |
getKeys(boolean child)
Get all keys
|
List |
getList(String key)
Get List value of config section element
|
List |
getList(String key,
List defaultList)
Get List value of config section element
|
long |
getLong(String key)
Get long value of config section element
|
long |
getLong(String key,
long defaultValue)
Get long value of config section element
|
List<Long> |
getLongList(String key)
Get Long List value of config section element
|
List<Map> |
getMapList(String key)
Get Map List value of config section element
|
ConfigSection |
getSection(String key)
Get config section element defined by key
|
ConfigSection |
getSections()
Get all ConfigSections in root path.
|
ConfigSection |
getSections(String key)
Get sections (and only sections) from provided path
|
List<Short> |
getShortList(String key)
Get Short List value of config section element
|
String |
getString(String key)
Get String value of config section element
|
String |
getString(String key,
String defaultValue)
Get String value of config section element
|
List<String> |
getStringList(String key)
Get String List value of config section element
|
boolean |
isBoolean(String key)
Check type of section element defined by key.
|
boolean |
isDouble(String key)
Check type of section element defined by key.
|
boolean |
isInt(String key)
Check type of section element defined by key.
|
boolean |
isList(String key)
Check type of section element defined by key.
|
boolean |
isLong(String key)
Check type of section element defined by key.
|
boolean |
isSection(String key)
Check type of section element defined by key.
|
boolean |
isString(String key)
Check type of section element defined by key.
|
void |
remove(String key)
Remove config section element
|
void |
set(String key,
Object value)
Store value into config section
|
ConfigSection getAll()
<T> T get(String key, T defaultValue)
key - defaultValue - boolean isSection(String key)
key - ConfigSection getSection(String key)
key - ConfigSection getSections()
getSections() will return new ConfigSection, that contains sections a1 and a2 only.
ConfigSection getSections(String key)
key - - config section path, if null or empty root path will used.int getInt(String key)
key - - key (inside) current section (default value equals to 0)int getInt(String key, int defaultValue)
key - - key (inside) current sectiondefaultValue - - default value that will returned if section element is not existsboolean isInt(String key)
key - long getLong(String key)
key - - key (inside) current sectionlong getLong(String key, long defaultValue)
key - - key (inside) current sectiondefaultValue - - default value that will returned if section element is not existsboolean isLong(String key)
key - double getDouble(String key)
key - - key (inside) current sectiondouble getDouble(String key, double defaultValue)
key - - key (inside) current sectiondefaultValue - - default value that will returned if section element is not existsboolean isDouble(String key)
key - String getString(String key)
key - - key (inside) current sectionString getString(String key, String defaultValue)
key - - key (inside) current sectiondefaultValue - - default value that will returned if section element is not existsboolean isString(String key)
key - boolean getBoolean(String key)
key - - key (inside) current sectionboolean getBoolean(String key, boolean defaultValue)
key - - key (inside) current sectiondefaultValue - - default value that will returned if section element is not existsboolean isBoolean(String key)
key - List getList(String key)
key - - key (inside) current sectionList getList(String key, List defaultList)
key - - key (inside) current sectiondefaultList - - default value that will returned if section element is not existsboolean isList(String key)
key - List<String> getStringList(String key)
key - - key (inside) current sectionList<Integer> getIntegerList(String key)
key - - key (inside) current sectionList<Boolean> getBooleanList(String key)
key - - key (inside) current sectionList<Double> getDoubleList(String key)
key - - key (inside) current sectionList<Float> getFloatList(String key)
key - - key (inside) current sectionList<Long> getLongList(String key)
key - - key (inside) current sectionList<Byte> getByteList(String key)
key - - key (inside) current sectionList<Character> getCharacterList(String key)
key - - key (inside) current sectionList<Short> getShortList(String key)
key - - key (inside) current sectionList<Map> getMapList(String key)
key - - key (inside) current sectionboolean exists(String key, boolean ignoreCase)
key - ignoreCase - boolean exists(String key)
key - void remove(String key)
key - Set<String> getKeys(boolean child)
child - - true = include child keysCopyright © 2017–2018 NukkitX. All rights reserved.