Package net.ME1312.Galaxi.Library.Config
Class YAMLSection
YAML Config Section Class
-
Constructor Summary
ConstructorDescriptionCreates an empty YAML SectionYAMLSection
(InputStream stream) Creates a YAML Section from an Input StreamYAMLSection
(Reader reader) Creates a YAML Section from a ReaderYAMLSection
(String str) Creates a YAML Section from a StringYAMLSection
(Map<? extends String, ?> map) Creates a YAML Section from Map ContentsYAMLSection
(ObjectMap<String> map) Creates a YAML Section from Map ContentsYAMLSection
(org.json.JSONObject json) Creates a YAML Section from JSON Contents -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone this MapgetSection
(String handle) Get a YAML Section by HandlegetSection
(String handle, Supplier<? extends YAMLSection> def) Get a YAML Section by HandlegetSection
(String handle, Map<? extends String, ?> def) Get a YAML Section by HandlegetSection
(String handle, YAMLSection def) Get a YAML Section by HandlegetSectionList
(String handle) Get a YAML Section List by HandlegetSectionList
(String handle, Collection<? extends Map<? extends String, ?>> def) Get a YAML Section List by HandlegetSectionList
(String handle, Supplier<? extends List<? extends YAMLSection>> def) Get a YAML Section List by HandlegetSectionList
(String handle, List<? extends YAMLSection> def) Get a YAML Section List by Handleorg.json.JSONObject
toJSON()
Convert to JSONtoString()
Methods inherited from class net.ME1312.Galaxi.Library.Map.ObjectMap
clear, contains, equals, get, get, get, get, get, getBoolean, getBoolean, getBoolean, getBooleanList, getBooleanList, getBooleanList, getDouble, getDouble, getDouble, getDoubleList, getDoubleList, getDoubleList, getEntries, getFloat, getFloat, getFloat, getFloatList, getFloatList, getFloatList, getInt, getInt, getInt, getIntList, getIntList, getIntList, getKeys, getList, getList, getList, getList, getLong, getLong, getLong, getLongList, getLongList, getLongList, getMap, getMap, getMap, getMap, getMapList, getMapList, getMapList, getMapList, getObject, getObject, getObject, getObjectList, getObjectList, getObjectList, getParent, getShort, getShort, getShort, getShortList, getShortList, getShortList, getString, getString, getString, getStringList, getStringList, getStringList, getUUID, getUUID, getUUID, getUUIDList, getUUIDList, getUUIDList, getValues, getVersion, getVersion, getVersion, getVersionList, getVersionList, getVersionList, isBoolean, isList, isMap, isNull, isNumber, isString, isUUID, key, remove, safeSet, safeSet, safeSetAll, safeSetAll, set, setAll, setAll
-
Constructor Details
-
YAMLSection
public YAMLSection()Creates an empty YAML Section -
YAMLSection
Creates a YAML Section from an Input Stream- Parameters:
stream
- Input Stream- Throws:
org.yaml.snakeyaml.error.YAMLException
-
YAMLSection
Creates a YAML Section from a Reader- Parameters:
reader
- Reader- Throws:
org.yaml.snakeyaml.error.YAMLException
-
YAMLSection
Creates a YAML Section from a String- Parameters:
str
- String- Throws:
org.yaml.snakeyaml.error.YAMLException
-
YAMLSection
Creates a YAML Section from Map Contents- Parameters:
map
- Map
-
YAMLSection
Creates a YAML Section from Map Contents- Parameters:
map
- Map
-
YAMLSection
public YAMLSection(org.json.JSONObject json) Creates a YAML Section from JSON Contents- Parameters:
json
- JSON
-
-
Method Details
-
clone
Description copied from class:ObjectMap
Clone this Map -
getSection
Get a YAML Section by Handle- Parameters:
handle
- Handle- Returns:
- Object Map
-
getSection
Get a YAML Section by Handle- Parameters:
handle
- Handledef
- Default- Returns:
- Object Map
-
getSection
Get a YAML Section by Handle- Parameters:
handle
- Handledef
- Default- Returns:
- Object Map
-
getSection
Get a YAML Section by Handle- Parameters:
handle
- Handledef
- Default- Returns:
- Object Map
-
getSectionList
Get a YAML Section List by Handle- Parameters:
handle
- Handle- Returns:
- Object Map List
-
getSectionList
public List<YAMLSection> getSectionList(String handle, Collection<? extends Map<? extends String, ?>> def) Get a YAML Section List by Handle- Parameters:
handle
- Handledef
- Default- Returns:
- Object Map List
-
getSectionList
Get a YAML Section List by Handle- Parameters:
handle
- Handledef
- Default- Returns:
- Object Map List
-
getSectionList
public List<YAMLSection> getSectionList(String handle, Supplier<? extends List<? extends YAMLSection>> def) Get a YAML Section List by Handle- Parameters:
handle
- Handledef
- Default- Returns:
- Object Map List
-
toString
-
toJSON
public org.json.JSONObject toJSON()Convert to JSON- Returns:
- JSON
-