public class Section extends Block<Map<Object,Block<?>>>
BoostedYAML represents every entry (key=value pair) in the file as a block, which also applies to sections - sections
actually store blocks, which carry the raw value - Java object. Please learn more about implementations
at wiki.
ADDITIONAL METHOD DOCUMENTATION:
If this section has an equivalent in the defaults (hasDefaults()), instead of returning that value,
returns the result of invoking the same method on the default section getDefaults().
This behaviour can be disabled (#3).
If there is no value at the given route in this section and this section has an equivalent in the defaults (hasDefaults()),
compares value at the same route in the default section getDefaults(). If no value is found there, immediately returns false.
This behaviour can be disabled (#3).
You can disable use of the defaults (if any) by the method using GeneralSettings.Builder#setUseDefaults(boolean).
| Modifier | Constructor and Description |
|---|---|
protected |
Section(Map<Object,Block<?>> defaultMap)
Creates a section using the given (not necessarily empty) instance of default map.
|
|
Section(YamlDocument root,
Section parent,
Route route,
Block<?> previous,
Map<?,?> mappings)
Creates a section using the given relatives, previous block and mappings.
|
|
Section(YamlDocument root,
Section parent,
Route route,
org.snakeyaml.engine.v2.nodes.Node keyNode,
org.snakeyaml.engine.v2.nodes.MappingNode valueNode,
ExtendedConstructor constructor)
Creates a section using the given relatives, nodes and constructor, which is used to retrieve the actual Java
representations of nodes (and sub-nodes).
|
| Modifier and Type | Method and Description |
|---|---|
Object |
adaptKey(Object key)
Adapts the given key, as defined by the key format currently in use (
GeneralSettings.getKeyFormat()). |
void |
clear()
Clears content within this section.
|
boolean |
contains(Route route)
Returns whether this section contains anything at the given route.
|
boolean |
contains(String route)
Returns whether this section contains anything at the given route.
|
Section |
createSection(Route route)
Creates sections along the whole route, including the route itself and returns the section created at the end (at
the route given).
|
Section |
createSection(String route)
Creates sections along the whole route, including the route itself and returns the section created at the end (at
the route given).
|
Object |
get(Route route)
Returns the value of the block (the actual value - list, integer...) at the given route, or if it is a section,
the corresponding
Section instance. |
Object |
get(Route route,
Object def)
Returns the value of the block (the actual value - list, integer...) at the given route, or if it is a section,
the corresponding
Section instance. |
Object |
get(String route)
Returns the value of the block (the actual value - list, integer...) at the given route, or if it is a section,
the corresponding
Section instance. |
Object |
get(String route,
Object def)
Returns the value of the block (the actual value - list, integer...) at the given route, or if it is a section,
the corresponding
Section instance. |
<T> T |
getAs(Route route,
Class<T> clazz)
Returns the value of the block (the actual value) at the given route, or if it is a section, the corresponding
Section instance, in both cases cast to instance of the given class. |
<T> T |
getAs(Route route,
Class<T> clazz,
T def)
Returns the value of the block (the actual value) at the given route, or if it is a section, the corresponding
Section instance, in both cases cast to instance of the given class. |
<T> T |
getAs(String route,
Class<T> clazz)
Returns the value of the block (the actual value) at the given route, or if it is a section, the corresponding
Section instance, in both cases cast to instance of the given class. |
<T> T |
getAs(String route,
Class<T> clazz,
T def)
Returns the value of the block (the actual value) at the given route, or if it is a section, the corresponding
Section instance, in both cases cast to instance of the given class. |
<T> Optional<T> |
getAsOptional(Route route,
Class<T> clazz)
|
<T> Optional<T> |
getAsOptional(String route,
Class<T> clazz)
|
BigInteger |
getBigInt(Route route)
Returns big integer at the given route.
|
BigInteger |
getBigInt(Route route,
BigInteger def)
Returns big integer at the given route.
|
BigInteger |
getBigInt(String route)
Returns big integer at the given route.
|
BigInteger |
getBigInt(String route,
BigInteger def)
Returns big integer at the given route.
|
List<BigInteger> |
getBigIntList(Route route)
Returns list of big integers at the given route.
|
List<BigInteger> |
getBigIntList(Route route,
List<BigInteger> def)
Returns list of big integers at the given route.
|
List<BigInteger> |
getBigIntList(String route)
Returns list of big integers at the given route.
|
List<BigInteger> |
getBigIntList(String route,
List<BigInteger> def)
Returns list of big integers at the given route.
|
Block<?> |
getBlock(Route route)
Returns the block encapsulated in the result of
getOptionalBlock(Route). |
Block<?> |
getBlock(String route)
Returns the block encapsulated in the result of
getOptionalBlock(String). |
Boolean |
getBoolean(Route route)
Returns boolean at the given route.
|
Boolean |
getBoolean(Route route,
Boolean def)
Returns boolean at the given route.
|
Boolean |
getBoolean(String route)
Returns boolean at the given route.
|
Boolean |
getBoolean(String route,
Boolean def)
Returns boolean at the given route.
|
Byte |
getByte(Route route)
Returns byte at the given route.
|
Byte |
getByte(Route route,
Byte def)
Returns byte at the given route.
|
Byte |
getByte(String route)
Returns byte at the given route.
|
Byte |
getByte(String route,
Byte def)
Returns byte at the given route.
|
List<Byte> |
getByteList(Route route)
Returns list of bytes at the given route.
|
List<Byte> |
getByteList(Route route,
List<Byte> def)
Returns list of bytes at the given route.
|
List<Byte> |
getByteList(String route)
Returns list of bytes at the given route.
|
List<Byte> |
getByteList(String route,
List<Byte> def)
Returns list of bytes at the given route.
|
Section |
getDefaults()
Returns equivalent of this section in the defaults.
|
Double |
getDouble(Route route)
Returns double at the given route.
|
Double |
getDouble(Route route,
Double def)
Returns double at the given route.
|
Double |
getDouble(String route)
Returns double at the given route.
|
Double |
getDouble(String route,
Double def)
Returns double at the given route.
|
List<Double> |
getDoubleList(Route route)
Returns list of doubles at the given route.
|
List<Double> |
getDoubleList(Route route,
List<Double> def)
Returns list of doubles at the given route.
|
List<Double> |
getDoubleList(String route)
Returns list of doubles at the given route.
|
List<Double> |
getDoubleList(String route,
List<Double> def)
Returns list of doubles at the given route.
|
Float |
getFloat(Route route)
Returns float at the given route.
|
Float |
getFloat(Route route,
Float def)
Returns float at the given route.
|
Float |
getFloat(String route)
Returns float at the given route.
|
Float |
getFloat(String route,
Float def)
Returns float at the given route.
|
List<Float> |
getFloatList(Route route)
Returns list of floats at the given route.
|
List<Float> |
getFloatList(Route route,
List<Float> def)
Returns list of floats at the given route.
|
List<Float> |
getFloatList(String route)
Returns list of floats at the given route.
|
List<Float> |
getFloatList(String route,
List<Float> def)
Returns list of floats at the given route.
|
Character |
getChar(Route route)
Returns char at the given route.
|
Character |
getChar(Route route,
Character def)
Returns char at the given route.
|
Character |
getChar(String route)
Returns char at the given route.
|
Character |
getChar(String route,
Character def)
Returns char at the given route.
|
Integer |
getInt(Route route)
Returns integer at the given route.
|
Integer |
getInt(Route route,
Integer def)
Returns integer at the given route.
|
Integer |
getInt(String route)
Returns integer at the given route.
|
Integer |
getInt(String route,
Integer def)
Returns integer at the given route.
|
List<Integer> |
getIntList(Route route)
Returns list of integers at the given route.
|
List<Integer> |
getIntList(Route route,
List<Integer> def)
Returns list of integers at the given route.
|
List<Integer> |
getIntList(String route)
Returns list of integers at the given route.
|
List<Integer> |
getIntList(String route,
List<Integer> def)
Returns list of integers at the given route.
|
Set<Object> |
getKeys()
Returns set of direct keys (in this section only - not deep); while not keeping any reference to this section.
|
List<?> |
getList(Route route)
Returns list at the given route.
|
List<?> |
getList(Route route,
List<?> def)
Returns list at the given route.
|
List<?> |
getList(String route)
Returns list at the given route.
|
List<?> |
getList(String route,
List<?> def)
Returns list at the given route.
|
Long |
getLong(Route route)
Returns long at the given route.
|
Long |
getLong(Route route,
Long def)
Returns long at the given route.
|
Long |
getLong(String route)
Returns long at the given route.
|
Long |
getLong(String route,
Long def)
Returns long at the given route.
|
List<Long> |
getLongList(Route route)
Returns list of longs at the given route.
|
List<Long> |
getLongList(Route route,
List<Long> def)
Returns list of longs at the given route.
|
List<Long> |
getLongList(String route)
Returns list of longs at the given route.
|
List<Long> |
getLongList(String route,
List<Long> def)
Returns list of longs at the given route.
|
List<Map<?,?>> |
getMapList(Route route)
Returns list of maps at the given route.
|
List<Map<?,?>> |
getMapList(Route route,
List<Map<?,?>> def)
Returns list of maps at the given route.
|
List<Map<?,?>> |
getMapList(String route)
Returns list of maps at the given route.
|
List<Map<?,?>> |
getMapList(String route,
List<Map<?,?>> def)
Returns list of maps at the given route.
|
Object |
getName()
Returns the name of this section.
|
Route |
getNameAsRoute()
Returns the name of this section as a single-key route.
|
String |
getNameAsString()
Returns the name of this section as a string.
|
Number |
getNumber(Route route)
Returns number at the given route.
|
Number |
getNumber(Route route,
Number def)
Returns number at the given route.
|
Number |
getNumber(String route)
Returns number at the given route.
|
Number |
getNumber(String route,
Number def)
Returns number at the given route.
|
Optional<Object> |
getOptional(Route route)
|
Optional<Object> |
getOptional(String route)
|
Optional<BigInteger> |
getOptionalBigInt(Route route)
Returns big integer at the given route encapsulated in an instance of
Optional. |
Optional<BigInteger> |
getOptionalBigInt(String route)
Returns big integer at the given route encapsulated in an instance of
Optional. |
Optional<List<BigInteger>> |
getOptionalBigIntList(Route route)
Returns list of big integers at the given route encapsulated in an instance of
Optional. |
Optional<List<BigInteger>> |
getOptionalBigIntList(String route)
Returns list of big integers at the given route encapsulated in an instance of
Optional. |
Optional<Block<?>> |
getOptionalBlock(Route route)
Returns block at the given route encapsulated in an instance of
Optional. |
Optional<Block<?>> |
getOptionalBlock(String route)
Returns block at the given string route encapsulated in an instance of
Optional. |
Optional<Boolean> |
getOptionalBoolean(Route route)
Returns boolean at the given route encapsulated in an instance of
Optional. |
Optional<Boolean> |
getOptionalBoolean(String route)
Returns boolean at the given route encapsulated in an instance of
Optional. |
Optional<Byte> |
getOptionalByte(Route route)
Returns byte at the given route encapsulated in an instance of
Optional. |
Optional<Byte> |
getOptionalByte(String route)
Returns byte at the given route encapsulated in an instance of
Optional. |
Optional<List<Byte>> |
getOptionalByteList(Route route)
Returns list of bytes at the given route encapsulated in an instance of
Optional. |
Optional<List<Byte>> |
getOptionalByteList(String route)
Returns list of bytes at the given route encapsulated in an instance of
Optional. |
Optional<Double> |
getOptionalDouble(Route route)
Returns double at the given route encapsulated in an instance of
Optional. |
Optional<Double> |
getOptionalDouble(String route)
Returns double at the given route encapsulated in an instance of
Optional. |
Optional<List<Double>> |
getOptionalDoubleList(Route route)
Returns list of doubles at the given route encapsulated in an instance of
Optional. |
Optional<List<Double>> |
getOptionalDoubleList(String route)
Returns list of doubles at the given route encapsulated in an instance of
Optional. |
Optional<Float> |
getOptionalFloat(Route route)
Returns float at the given route encapsulated in an instance of
Optional. |
Optional<Float> |
getOptionalFloat(String route)
Returns float at the given route encapsulated in an instance of
Optional. |
Optional<List<Float>> |
getOptionalFloatList(Route route)
Returns list of floats at the given route encapsulated in an instance of
Optional. |
Optional<List<Float>> |
getOptionalFloatList(String route)
Returns list of floats at the given route encapsulated in an instance of
Optional. |
Optional<Character> |
getOptionalChar(Route route)
Returns char at the given route encapsulated in an instance of
Optional. |
Optional<Character> |
getOptionalChar(String route)
Returns char at the given route encapsulated in an instance of
Optional. |
Optional<Integer> |
getOptionalInt(Route route)
Returns number at the given route encapsulated in an instance of
Optional. |
Optional<Integer> |
getOptionalInt(String route)
Returns integer at the given route encapsulated in an instance of
Optional. |
Optional<List<Integer>> |
getOptionalIntList(Route route)
Returns list of integers at the given route encapsulated in an instance of
Optional. |
Optional<List<Integer>> |
getOptionalIntList(String route)
Returns list of integers at the given route encapsulated in an instance of
Optional. |
Optional<List<?>> |
getOptionalList(Route route)
Returns list at the given route encapsulated in an instance of
Optional. |
Optional<List<?>> |
getOptionalList(String route)
Returns list at the given route encapsulated in an instance of
Optional. |
Optional<Long> |
getOptionalLong(Route route)
Returns long at the given route encapsulated in an instance of
Optional. |
Optional<Long> |
getOptionalLong(String route)
Returns long at the given route encapsulated in an instance of
Optional. |
Optional<List<Long>> |
getOptionalLongList(Route route)
Returns list of longs at the given route encapsulated in an instance of
Optional. |
Optional<List<Long>> |
getOptionalLongList(String route)
Returns list of longs at the given route encapsulated in an instance of
Optional. |
Optional<List<Map<?,?>>> |
getOptionalMapList(Route route)
Returns list of maps at the given route encapsulated in an instance of
Optional. |
Optional<List<Map<?,?>>> |
getOptionalMapList(String route)
Returns list of maps at the given route encapsulated in an instance of
Optional. |
Optional<Number> |
getOptionalNumber(Route route)
Returns number at the given route encapsulated in an instance of
Optional. |
Optional<Number> |
getOptionalNumber(String route)
Returns number at the given route encapsulated in an instance of
Optional. |
Optional<Section> |
getOptionalSection(Route route)
Returns section at the given route encapsulated in an instance of
Optional. |
Optional<Section> |
getOptionalSection(String route)
Returns section at the given route encapsulated in an instance of
Optional. |
Optional<Short> |
getOptionalShort(Route route)
Returns short at the given route encapsulated in an instance of
Optional. |
Optional<Short> |
getOptionalShort(String route)
Returns short at the given route encapsulated in an instance of
Optional. |
Optional<List<Short>> |
getOptionalShortList(Route route)
Returns list of shorts at the given route encapsulated in an instance of
Optional. |
Optional<List<Short>> |
getOptionalShortList(String route)
Returns list of shorts at the given route encapsulated in an instance of
Optional. |
Optional<String> |
getOptionalString(Route route)
Returns string at the given route encapsulated in an instance of
Optional. |
Optional<String> |
getOptionalString(String route)
Returns string at the given route encapsulated in an instance of
Optional. |
Optional<List<String>> |
getOptionalStringList(Route route)
Returns list of strings at the given route encapsulated in an instance of
Optional. |
Optional<List<String>> |
getOptionalStringList(String route)
Returns list of strings at the given route encapsulated in an instance of
Optional. |
Section |
getParent()
Returns the parent section, or
null if this section has no parent - the section is also the root
(check isRoot()). |
Optional<Section> |
getParent(Route route)
Returns section at the parent route of the given one, encapsulated in an instance of
Optional. |
Optional<Section> |
getParent(String route)
Returns section at the parent route of the given one, encapsulated in an instance of
Optional. |
YamlDocument |
getRoot()
Returns the root file of this section.
|
Route |
getRoute()
Returns the absolute route of this section (route to this section from the root
getRoot()). |
String |
getRouteAsString()
Returns the absolute route of this section (route to this section from the root
getRoot()) as a string. |
Map<Route,Block<?>> |
getRouteMappedBlocks(boolean deep)
Returns a complete map of route=block pairs; while not keeping any reference to this (or sub-) sections.
|
Map<Route,Object> |
getRouteMappedValues(boolean deep)
Returns a complete map of route=value pairs; while not keeping any reference to this (or sub-) sections.
|
Set<Route> |
getRoutes(boolean deep)
Returns set of routes in this section; while not keeping any reference to this (or sub-) sections.
|
Set<String> |
getRoutesAsStrings(boolean deep)
Returns set of routes (interpreted as strings) in this section; while not keeping any reference to this (or sub-)
sections.
|
Section |
getSection(Route route)
Returns section at the given route.
|
Section |
getSection(Route route,
Section def)
Returns section at the given route.
|
Section |
getSection(String route)
Returns section at the given route.
|
Section |
getSection(String route,
Section def)
Returns section at the given route.
|
Short |
getShort(Route route)
Returns short at the given route.
|
Short |
getShort(Route route,
Short def)
Returns short at the given route.
|
Short |
getShort(String route)
Returns short at the given route.
|
Short |
getShort(String route,
Short def)
Returns short at the given route.
|
List<Short> |
getShortList(Route route)
Returns list of shorts at the given route.
|
List<Short> |
getShortList(Route route,
List<Short> def)
Returns list of shorts at the given route.
|
List<Short> |
getShortList(String route)
Returns list of shorts at the given route.
|
List<Short> |
getShortList(String route,
List<Short> def)
Returns list of shorts at the given route.
|
String |
getString(Route route)
Returns string at the given route.
|
String |
getString(Route route,
String def)
Returns string at the given route.
|
String |
getString(String route)
Returns string at the given route.
|
String |
getString(String route,
String def)
Returns string at the given route.
|
List<String> |
getStringList(Route route)
Returns list of strings at the given route.
|
List<String> |
getStringList(Route route,
List<String> def)
Returns list of strings at the given route.
|
List<String> |
getStringList(String route)
Returns list of strings at the given route.
|
List<String> |
getStringList(String route,
List<String> def)
Returns list of strings at the given route.
|
Map<String,Block<?>> |
getStringRouteMappedBlocks(boolean deep)
Returns a complete map of route=block pairs; while not keeping any reference to this (or sub-) sections.
|
Map<String,Object> |
getStringRouteMappedValues(boolean deep)
Returns a complete map of route=value pairs; while not keeping any reference to this (or sub-) sections.
|
Route |
getSubRoute(Object key)
Returns sub-route for the specified key derived from this section's
route. |
boolean |
hasDefaults()
Returns if this section has an equivalent in the defaults.
|
protected void |
init(YamlDocument root,
org.snakeyaml.engine.v2.nodes.Node keyNode,
org.snakeyaml.engine.v2.nodes.MappingNode valueNode,
ExtendedConstructor constructor)
Initializes this section, and it's contents using the given parameters, while also initializing the superclass by
calling
Block.init(Node, Node). |
protected void |
initEmpty(YamlDocument root)
Initializes this section as an empty one.
|
<T> boolean |
is(Route route,
Class<T> clazz)
Returns
true if and only value (list, integer... or Section) at the given route exists, and
it is an instance of the given class. |
<T> boolean |
is(String route,
Class<T> clazz)
Returns
true if and only value (list, integer... or Section) at the given route exists, and
it is an instance of the given class. |
boolean |
isBigInt(Route route)
Returns
true if and only a value at the given route exists, and it is a BigInteger. |
boolean |
isBigInt(String route)
Returns
true if and only a value at the given route exists, and it is a BigInteger. |
boolean |
isBoolean(Route route)
Returns
true if and only a value at the given route exists, and it is a Boolean (or the
primitive variant). |
boolean |
isBoolean(String route)
Returns
true if and only a value at the given route exists, and it is a Boolean (or the
primitive variant). |
boolean |
isByte(Route route)
Returns
true if and only a value at the given route exists, and it is a Byte (or the
primitive variant). |
boolean |
isByte(String route)
Returns
true if and only a value at the given route exists, and it is a Byte (or the
primitive variant). |
boolean |
isDecimal(Route route)
|
boolean |
isDecimal(String route)
|
boolean |
isDouble(Route route)
Returns
true if and only a value at the given route exists, and it is a Double (or the
primitive variant). |
boolean |
isDouble(String route)
Returns
true if and only a value at the given route exists, and it is a Double (or the
primitive variant). |
boolean |
isEmpty(boolean deep)
Returns
true if this section is empty, false otherwise. |
boolean |
isFloat(Route route)
Returns
true if and only a value at the given route exists, and it is a Float (or the
primitive variant). |
boolean |
isFloat(String route)
Returns
true if and only a value at the given route exists, and it is a Float (or the
primitive variant). |
boolean |
isChar(Route route)
Returns
true if and only a value at the given route exists, and it is a Character, or any
other compatible type defined by getOptionalChar(Route). |
boolean |
isChar(String route)
Returns
true if and only a value at the given route exists, and it is a Character, or any
other compatible type defined by getOptionalChar(String). |
boolean |
isInt(Route route)
Returns
true if and only a value at the given route exists, and it is an Integer (or the
primitive variant). |
boolean |
isInt(String route)
Returns
true if and only a value at the given route exists, and it is an Integer (or the
primitive variant). |
boolean |
isList(Route route)
Returns
true if and only a value at the given route exists, and it is a List. |
boolean |
isList(String route)
Returns
true if and only a value at the given route exists, and it is a List. |
boolean |
isLong(Route route)
Returns
true if and only a value at the given route exists, and it is a Long (or the
primitive variant). |
boolean |
isLong(String route)
Returns
true if and only a value at the given route exists, and it is a Long (or the
primitive variant). |
boolean |
isNumber(Route route)
Returns
true if and only a value at the given route exists, and it is an Number. |
boolean |
isNumber(String route)
Returns
true if and only a value at the given route exists, and it is an Number. |
boolean |
isRoot()
Returns whether this section is simultaneously the root section (file).
|
boolean |
isSection()
Returns if this block represents a
section. |
boolean |
isSection(Route route)
Returns
true if and only a value at the given route exists, and it is a Section. |
boolean |
isSection(String route)
Returns
true if and only a value at the given route exists, and it is a Section. |
boolean |
isShort(Route route)
Returns
true if and only a value at the given route exists, and it is a Short (or the
primitive variant). |
boolean |
isShort(String route)
Returns
true if and only a value at the given route exists, and it is a Short (or the
primitive variant). |
boolean |
isString(Route route)
Returns
true if and only a value at the given route exists, and it is a String. |
boolean |
isString(String route)
Returns
true if and only a value at the given route exists, and it is a String. |
boolean |
remove(Route route)
Removes entry at the given route (if any); returns
true if successfully removed. |
boolean |
remove(String route)
Removes entry at the given route (if any); returns
true if successfully removed. |
void |
set(Route route,
Object value)
Sets the given value at the given route in this section - overwrites the already existing value (if any).
|
void |
set(String route,
Object value)
Sets the given value at the given route in this section - overwrites the already existing value (if any).
|
void |
setInternal(Object key,
Object value)
Internally sets the given value at the given key in this section - overwrites the already existing value (if
any).
|
addComment, addComments, getComments, getStoredValue, init, isIgnored, removeComments, setComments, setIgnoredpublic Section(@NotNull
YamlDocument root,
@Nullable
Section parent,
@NotNull
Route route,
@Nullable
org.snakeyaml.engine.v2.nodes.Node keyNode,
@NotNull
org.snakeyaml.engine.v2.nodes.MappingNode valueNode,
@NotNull
ExtendedConstructor constructor)
root - root fileparent - parent section (or null if this is the root section)route - absolute (starting from the root file) route to this sectionkeyNode - node which represents the key to this section, used only to retrieve commentsvalueNode - node which represents this section's contentsconstructor - constructor used to construct all the nodes contained within the root file, used to retrieve
Java instances of the nodessuperclass constructor usedpublic Section(@NotNull
YamlDocument root,
@Nullable
Section parent,
@NotNull
Route route,
@Nullable
Block<?> previous,
@NotNull
Map<?,?> mappings)
root - root fileparent - parent section (or null if this is the root section)route - absolute (starting from the root file) route to this sectionprevious - previous block at the same position, used to reference comments frommappings - raw (containing Java values directly; no Block instances) content mapsuperclass constructor usedprotected Section(@NotNull
Map<Object,Block<?>> defaultMap)
Sets the root file, parent section, name and route to null.
This constructor is only used by the extending class, where nodes are unknown at the time
of
initialization. It is needed to call init(YamlDocument, Node, MappingNode, ExtendedConstructor)
afterwards.
defaultMap - the content mapsuperclass constructor usedprotected void initEmpty(@NotNull
YamlDocument root)
This method must only be called if isRoot() returns true. Expect an IllegalStateException otherwise.
root - the root fileprotected void init(@NotNull
YamlDocument root,
@Nullable
org.snakeyaml.engine.v2.nodes.Node keyNode,
@NotNull
org.snakeyaml.engine.v2.nodes.MappingNode valueNode,
@NotNull
ExtendedConstructor constructor)
Block.init(Node, Node).root - the root file of this sectionkeyNode - node which represents the key to this section, used only to retrieve commentsvalueNode - node which represents this section's contentsconstructor - constructor used to construct all the nodes contained within the root file, used to retrieve
Java instances of the nodespublic boolean isEmpty(boolean deep)
true if this section is empty, false otherwise. The parameter indicates if to
search subsections too, which gives the true indication if the section is empty.
If deep is false, returns only the result of Map.isEmpty() called on the
content map represented by this section. However, the section (underlying map) might also contain sections, which
are empty, resulting in incorrect returned value by this method false.
If deep == true, iterates through contents of this section. If any of the values is not a section,
returns false. If it is a section, runs this method recursively (with
deep set to true) and returns false if the result of that call is
false. If the iteration finished and none of the sub-calls returned otherwise, returns
true.
deep - if to search deeplypublic boolean isSection()
Blocksection.public boolean isRoot()
@NotNull public YamlDocument getRoot()
public Section getParent()
null if this section has no parent - the section is also the root
(check isRoot()).null if none@Nullable public Object getName()
If this section is the root (check isRoot()), returns null.
Incompatible with Spigot/BungeeCord API, where those, if this section represented the root file, would return an empty string.
@Nullable public String getNameAsString()
If this section is the root (check isRoot()), returns null.
Incompatible with Spigot/BungeeCord API, where those, if this section represented the root file, would return an empty string.
@NotNull public Route getNameAsRoute()
If this section is the root (check isRoot()), returns null.
Incompatible with Spigot/BungeeCord API, where those, if this section represented the root file, would return an empty string.
@Nullable public Route getRoute()
getRoot()). If this
section represents the root file (check isRoot()), returns null.
Incompatible with Spigot/BungeeCord API, where those, if this section represented the root file, would return an empty string.
getRoot()@Nullable public String getRouteAsString()
getRoot()) as a string.
If this section represents the root file (check isRoot()), returns null.
Incompatible with Spigot/BungeeCord API, where those, if this section represented the root file, would return an empty string.
getRoot()@NotNull public Route getSubRoute(@NotNull Object key)
route.
More formally, calls Route.addTo(Route, Object).
key - key to addsection's absolute routeRoute.addTo(Route, Object)@Nullable public Section getDefaults()
If there is not such section, returns null.
null if there's not anyhasDefaults()public boolean hasDefaults()
@NotNull public Object adaptKey(@NotNull Object key)
GeneralSettings.getKeyFormat()).
More formally, if key format is STRING, returns the result of Object.toString() on
the given key object, the key object given otherwise.
key - the key object to adapt@NotNull public Set<Route> getRoutes(boolean deep)
GeneralSettings.getDefaultSet(). The routes are relative to this section.
If deep is set to false, (effectively) returns the result of getKeys() with
the keys converted to routes, each with one element - the key itself.
Otherwise, also iterates through all sub-sections, while returning truly complete set of routes within this section.
It is guaranteed that call to contains(Route) with any route from the returned set will return
true (unless modified in between).
The returned map will also contain routes from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
deep - if to get routes deeply (from sub-sections)@NotNull public Set<String> getRoutesAsStrings(boolean deep)
GeneralSettings.getDefaultSet(). The routes are relative
to this section.
If deep is set to false, (effectively) returns the result of getKeys() with
the keys converted to string.
Otherwise, also iterates through all sub-sections, while returning truly complete set of routes within this section.
The returned routes will have the keys separated by the root's separator (GeneralSettings.getRouteSeparator()).
It is guaranteed that call to contains(String) with any route from the returned set will return
true (unless modified in between).
The returned map will also contain routes from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
deep - if to get routes deeply@NotNull public Set<Object> getKeys()
More formally, returns the key set of the underlying map. The returned set is an instance of GeneralSettings.getDefaultSet().
The returned map will also contain keys from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
getRoutes(boolean),
getRoutesAsStrings(boolean)@NotNull public Map<Route,Object> getRouteMappedValues(boolean deep)
GeneralSettings.getDefaultMap(). The routes are relative to this
section.
If deep is set to false, returns (effectively) a copy of the underlying map with keys
(which are stored as object instances) converted to routes each with one element - the key itself;
with their corresponding values (might also be a section).
Otherwise, also iterates through all sub-sections, while returning truly complete map of route=value pairs within this section.
It is guaranteed that call to get(Route) with any route from the returned map will return the value
assigned to that route in the returned map (unless modified in between).
The returned map will also contain entries from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
deep - if to get values from sub-sections too@NotNull public Map<String,Object> getStringRouteMappedValues(boolean deep)
GeneralSettings.getDefaultMap(). The routes are relative to this
section.
If deep is set to false, returns (effectively) a copy of the underlying map with keys
(which are stored as object instances) converted to string routes containing one key - the key itself; with their
corresponding values (might also be a section).
Otherwise, also iterates through all sub-sections, while returning truly complete map of route=value pairs within this section.
The returned routes will have the keys separated by the root's separator (GeneralSettings.getRouteSeparator()).
It is guaranteed that call to get(String) with any route from the returned map will return the value
assigned to that route in the returned map (unless modified in between).
The returned map will also contain entries from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
deep - if to get values from sub-sections too@NotNull public Map<Route,Block<?>> getRouteMappedBlocks(boolean deep)
GeneralSettings.getDefaultMap(). The routes are relative to this
section.
If deep is set to false, returns (effectively) a copy of the underlying map with keys
(which are stored as object instances) converted to routes each with one element - the key itself;
with their corresponding blocks.
Otherwise, also iterates through all sub-sections, while returning truly complete map of route=block pairs within this section.
It is guaranteed that call to getBlock(Route) with any route from the returned map will return the block
assigned to that route in the returned map (unless modified in between).
The returned map will also contain entries from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
deep - if to get blocks from sub-sections too@NotNull public Map<String,Block<?>> getStringRouteMappedBlocks(boolean deep)
GeneralSettings.getDefaultMap(). The routes are relative to this
section.
If deep is set to false, returns (effectively) a copy of the underlying map with keys
(which are stored as object instances) converted to string routes containing one key - the key itself; with their
corresponding blocks.
Otherwise, also iterates through all sub-sections, while returning truly complete map of route=block pairs within this section.
The returned routes will have the keys separated by the root's separator (GeneralSettings.getRouteSeparator()).
It is guaranteed that call to getBlock(String) with any route from the returned map will return the
block assigned to that route in the returned map (unless modified in between).
The returned map will also contain entries from the equivalent section in the defaults, if
any. Disable use of defaults (#3).
deep - if to get blocks from sub-sections toopublic boolean contains(@NotNull
Route route)
route - the route to checkgetBlock(Route)public boolean contains(@NotNull
String route)
route - the route to checkgetBlock(String)public Section createSection(@NotNull Route route)
If there is a section already at the route, nothing is overwritten and the already existing section is returned.
Please note that anything in the way will be overwritten. However, comments of each already existing block along the route will be kept and will be assigned to the new section created at its place.
route - the route to create a section at (with all parent sections)public Section createSection(@NotNull String route)
If there is a section already at the route, nothing is overwritten and the already existing section is returned.
Please note that anything in the way will be overwritten. However, comments of each already existing block along the route will be kept and will be assigned to the new section created at its place.
route - the route to create a section at (with all parent sections)public void set(@NotNull
Route route,
@Nullable
Object value)
As the value to set, you can give instances of anything, with the following warnings:
null: valid value (please use remove(Route) to remove entries),Section: the given section will be moved here (including comments, it will be deleted from the previous location),Block: the given block will be pasted here (including comments, !!will keep reference to the previous location, delete it manually from there!!),Map: a section will be created and initialized by the contents of the given map and comments of
the previous block at that key (if any); where the map must only contain raw content (e.g. no Block
instances; please see Section(YamlDocument, Section, Route, Block, Map) for more information),
If there's any entry at the given route, it's comments are kept and assigned to the new entry (does not apply
when the value is an instance of Block, in which case comments from the block are preserved.
Attempt to set an instance of Section whose call to isRoot() returns true is
considered illegal and will result in an IllegalArgumentException. Similarly, attempting to move sections
between two different files with different key formats will result in such exception.
route - the route to set atvalue - the value to setpublic void set(@NotNull
String route,
@Nullable
Object value)
As the value to set, you can give instances of anything, with the following warnings:
null: valid value (please use remove(Route) to remove entries),Section: the given section will be moved here (including comments, it will be deleted from the previous location),Block: the given block will be pasted here (including comments, !!will keep reference to the previous location, delete it manually from there!!),Map: a section will be created and initialized by the contents of the given map and comments of
the previous block at that key (if any); where the map must only contain raw content (e.g. no Block
instances; please see Section(YamlDocument, Section, Route, Block, Map) for more information),
If there's any entry at the given route, it's comments are kept and assigned to the new entry (does not apply
when the value is an instance of Block, in which case comments from the block are preserved.
Attempt to set an instance of Section whose call to isRoot() returns true is
considered illegal and will result in an IllegalArgumentException. Similarly, attempting to move sections
between two different files with different key formats will result in such exception.
route - the route to set atvalue - the value to setpublic void setInternal(@NotNull
Object key,
@Nullable
Object value)
Please read more about the implementation at set(Route, Object).
key - the (already adapted) key at which to set the valuevalue - the value to setpublic boolean remove(@NotNull
Route route)
true if successfully removed. The method returns
false if and only no entry exists at the route.route - the route to remove the entry atpublic boolean remove(@NotNull
String route)
true if successfully removed. The method returns
false if and only no entry exists at the route (nothing was removed).route - the route to remove the entry atpublic void clear()
public Optional<Block<?>> getOptionalBlock(@NotNull Route route)
Optional. If there is no block present
(no value) at the given route, returns an empty optional.
Each value is encapsulated in a Block: Section or TerminatedBlock instances. See the wiki for more information.
Functionality notes: When individual elements (keys) of the given route are traversed, they are (without
modifying the route object given - it is immutable) adapted to the current key format setting (see adaptKey(Object)).
This is one of the fundamental methods, upon which the functionality of other methods in this class is built.
route - the route to get the block atpublic Optional<Block<?>> getOptionalBlock(@NotNull String route)
Optional. If there is no block
present (no value) at the given route, returns an empty optional.
Each value is encapsulated in a Block: Section or TerminatedBlock instances. See the wiki for more information.
Functionality notes: The given route must contain individual keys separated using the separator character
configured using GeneralSettings.Builder#setRouteSeparator(char).
If the given string route does not contain the separator character (is only one key), the route refers to content in this section.
Otherwise, traverses appropriate subsections determined by the keys contained, and returns the block at the last
key defined in the given route (just like paths to files...). For example, for route separator
'.' and route a.b, this method firstly attempts to get the section at key
"a" in this section, then block at "b" in that (keyed as
"a") section.
We can also interpret this behaviour as a call to getOptionalBlock(Route) with route created via
constructor Route.fromString(String, char) (which effectively splits the given string route into separate
string keys according to the separator).
This method works independently of the root's GeneralSettings.getKeyFormat(). However, as the given route
contains individual string keys, if set to GeneralSettings.KeyFormat.OBJECT, you will only be able to access data at
routes containing only keys parsed as strings (no integer, boolean... or null keys) by SnakeYAML
Engine. If such functionality is needed, use getOptionalBlock(Route) instead.
Please note that compatibility with Spigot/BungeeCord API is not maintained regarding empty string keys, where those APIs would return the instance of the current block - this section.
This is one of the fundamental methods, upon which the functionality of other methods in this class is built.
route - the string route to get the block atpublic Block<?> getBlock(@NotNull Route route)
getOptionalBlock(Route).
If it's an empty Optional, returns nullor value from defaults
(#1).
route - the string route to get the block atnull if it doesn't existgetOptionalBlock(Route)public Block<?> getBlock(@NotNull String route)
getOptionalBlock(String).
If it's an empty Optional, returns nullor value from defaults
(#1).
route - the string route to get the block atnull if it doesn't existgetOptionalBlock(String)public Optional<Section> getParent(@NotNull Route route)
Optional. Said
differently, the returned section is the result of getSection(Route) called for the same route as given
here, with the last route element removed.
That means, this method ignores if the given route represents an existing block. If block at that parent route is not a section, returns an empty optional.
route - the route to get the parent section frompublic Optional<Section> getParent(@NotNull String route)
Optional. Said
differently, the returned section is effectively the result of getSection(Route) called for the same
route as given here, with the last route element removed (Route.parent()).
That means, this method ignores if the given route represents an existing block. If block at that parent route is not a section, returns an empty optional.
route - the route to get the parent section frompublic Optional<Object> getOptional(@NotNull Route route)
Section instance; encapsulated in an instance of Optional.
If there is no block present at the given route (therefore no value can be returned), returns an empty optional.
route - the route to get the value atpublic Optional<Object> getOptional(@NotNull String route)
Section instance; encapsulated in an instance of Optional.
If there is no block present at the given route (therefore no value can be returned), returns an empty optional.
route - the route to get the value atpublic Object get(@NotNull Route route)
Section instance.
If there is no block present at the given route (therefore no value can be returned), returns default value
defined by root's general settings GeneralSettings.getDefaultObject()or value from
defaults.
route - the route to get the value atpublic Object get(@NotNull String route)
Section instance.
If there is no block present at the given route (therefore no value can be returned), returns default value
defined by root's general settings GeneralSettings.getDefaultObject()or value from
defaults.
route - the route to get the value atpublic Object get(@NotNull Route route, @Nullable Object def)
Section instance.
If there is no block present at the given route (therefore no value can be returned), returns the provided default.
route - the route to get the value atdef - the default valuepublic Object get(@NotNull String route, @Nullable Object def)
Section instance.
If there is no block present at the given route (therefore no value can be returned), returns the provided default.
route - the route to get the value atdef - the default valuepublic <T> Optional<T> getAsOptional(@NotNull Route route, @NotNull Class<T> clazz)
Section instance, in both cases cast to instance of the given class; encapsulated in an instance of
Optional.
If there is no block present at the given route (therefore no value can be returned), or the value (block's
actual value or Section instance) is not castable to the given type, returns an empty optional.
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double) and also between two different numeric types (e.g. Double -
int).
T - the target typeroute - the route to get the value atclazz - class of the target typepublic <T> Optional<T> getAsOptional(@NotNull String route, @NotNull Class<T> clazz)
Section instance, in both cases cast to instance of the given class; encapsulated in an instance of
Optional.
If there is no block present at the given route (therefore no value can be returned), or the value (block's
actual value or Section instance) is not castable to the given type, returns an empty optional.
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double) and also between two different numeric types (e.g. Double -
int).
T - the target typeroute - the route to get the value atclazz - class of the target typepublic <T> T getAs(@NotNull
Route route,
@NotNull
Class<T> clazz)
Section instance, in both cases cast to instance of the given class.
If there is no block present at the given route (therefore no value can be returned), or the value (block's
actual value or Section instance) is not castable to the given type, returns nullor value from defaults (#1).
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double) and also between two different numeric types (e.g. Double -
int).
T - the target typeroute - the route to get the value atclazz - class of the target typepublic <T> T getAs(@NotNull
String route,
@NotNull
Class<T> clazz)
Section instance, in both cases cast to instance of the given class.
If there is no block present at the given route (therefore no value can be returned), or the value (block's
actual value or Section instance) is not castable to the given type, returns nullor value from defaults (#1).
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double) and also between two different numeric types (e.g. Double -
int).
T - the target typeroute - the route to get the value atclazz - class of the target typepublic <T> T getAs(@NotNull
Route route,
@NotNull
Class<T> clazz,
@Nullable
T def)
Section instance, in both cases cast to instance of the given class.
If there is no block present at the given route (therefore no value can be returned), or the value (block's
actual value or Section instance) is not castable to the given type, returns the provided default.
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double) and also between two different numeric types (e.g. Double -
int).
T - the target typeroute - the route to get the value atclazz - class of the target typedef - the default valuepublic <T> T getAs(@NotNull
String route,
@NotNull
Class<T> clazz,
@Nullable
T def)
Section instance, in both cases cast to instance of the given class.
If there is no block present at the given route (therefore no value can be returned), or the value (block's
actual value or Section instance) is not castable to the given type, returns the provided default.
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double) and also between two different numeric types (e.g. Double -
int).
T - the target typeroute - the route to get the value atclazz - class of the target typedef - the default valuepublic <T> boolean is(@NotNull
Route route,
@NotNull
Class<T> clazz)
true if and only value (list, integer... or Section) at the given route exists, and
it is an instance of the given class. If no value is at the route, checks the defaults
(#2).
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double).
T - the target typeroute - the route to check the value atclazz - class of the target typepublic <T> boolean is(@NotNull
String route,
@NotNull
Class<T> clazz)
true if and only value (list, integer... or Section) at the given route exists, and
it is an instance of the given class. If no value is at the route, checks the defaults
(#2).
This method supports casting between a primitive types and their non-primitive representations (e.g.
Double - double).
T - the target typeroute - the route to check the value atclazz - class of the target typepublic Optional<Section> getOptionalSection(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not a Section, returns an empty optional.route - the route to get the section atgetAsOptional(Route, Class)public Optional<Section> getOptionalSection(@NotNull String route)
Optional. If nothing is present at the
given route, or is not a Section, returns an empty optional.route - the route to get the section atgetAsOptional(String, Class)public Section getSection(@NotNull Route route)
Section,
returns null, or value from defaults (#1).route - the route to get the section atgetSection(Route, Section)public Section getSection(@NotNull String route)
Section,
returns null, or value from defaults (#1).route - the route to get the section atgetSection(String, Section)public Section getSection(@NotNull Route route, @Nullable Section def)
Section,
returns the provided default.route - the route to get the section atdef - the default valuegetOptionalSection(Route)public Section getSection(@NotNull String route, @Nullable Section def)
Section,
returns the provided default.route - the route to get the section atdef - the default valuegetOptionalSection(String)public boolean isSection(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Section. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isSection(@NotNull
String route)
true if and only a value at the given route exists, and it is a Section. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<String> getOptionalString(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, String instance is preferred. Anything else is converted to one using Object.toString().
route - the route to get the string atgetOptional(Route)public Optional<String> getOptionalString(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, String instance is preferred. Anything else is converted to one using Object.toString().
route - the route to get the string atgetOptional(String)public String getString(@NotNull Route route)
GeneralSettings.getDefaultString()or value from defaults (#1).
Natively, String instance is preferred. Anything else is converted to one using Object.toString().
route - the route to get the string atgetString(Route, String)public String getString(@NotNull String route)
GeneralSettings.getDefaultString()or value from defaults (#1).
Natively, String instance is preferred. Anything else is converted to one using Object.toString().
route - the route to get the string atgetString(String, String)public String getString(@NotNull Route route, @Nullable String def)
Natively, String instance is preferred. Anything else is converted to one using Object.toString().
route - the route to get the string atdef - the default valuegetOptionalString(Route)public String getString(@NotNull String route, @Nullable String def)
Natively, String instance is preferred. Anything else is converted to one using Object.toString().
route - the route to get the string atdef - the default valuegetOptionalString(String)public boolean isString(@NotNull
Route route)
true if and only a value at the given route exists, and it is a String. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isString(@NotNull
String route)
true if and only a value at the given route exists, and it is a String. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Character> getOptionalChar(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Character instance is preferred. However, if there is an instance of String and it is
exactly 1 character in length, returns that character. If is an Integer (or primitive variant), it is
converted to a character (by casting, see the ASCII table).
route - the route to get the char atgetOptional(Route)public Optional<Character> getOptionalChar(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Character instance is preferred. However, if there is an instance of String and it is
exactly 1 character in length, returns that character. If is an Integer (or primitive variant), it is
converted to a character (by casting, see the ASCII table).
route - the route to get the char atgetOptional(String)public Character getChar(@NotNull Route route)
GeneralSettings.getDefaultChar()or value from defaults (#1).
Natively, Character instance is preferred. However, if there is an instance of String and it is
exactly 1 character in length, returns that character. If is an Integer (or primitive variant), it is
converted to a character (by casting, see the ASCII table).
route - the route to get the char atgetChar(Route, Character)public Character getChar(@NotNull String route)
GeneralSettings.getDefaultChar()or value from defaults (#1).
Natively, Character instance is preferred. However, if there is an instance of String and it is
exactly 1 character in length, returns that character. If is an Integer (or primitive variant), it is
converted to a character (by casting, see the ASCII table).
route - the route to get the char atgetChar(String, Character)public Character getChar(@NotNull Route route, @Nullable Character def)
If nothing is present at the given route, or is not an instance of any compatible type (see below), returns the provided default.
Natively, Character instance is preferred. However, if there is an instance of String and it is
exactly 1 character in length, returns that character. If is an Integer (or primitive variant), it is
converted to a character (by casting, see the ASCII table).
route - the route to get the char atdef - the default valuegetOptionalChar(Route)public Character getChar(@NotNull String route, @Nullable Character def)
If nothing is present at the given route, or is not an instance of any compatible type (see below), returns the provided default.
Natively, Character instance is preferred. However, if there is an instance of String and it is
exactly 1 character in length, returns that character. If is an Integer (or primitive variant), it is
converted to a character (by casting, see the ASCII table).
route - the route to get the char atdef - the default valuegetOptionalChar(String)public boolean isChar(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Character, or any
other compatible type defined by getOptionalChar(Route). If no value is at the route,
checks the defaults (#2).route - the route to check the value atget(Route)public boolean isChar(@NotNull
String route)
true if and only a value at the given route exists, and it is a Character, or any
other compatible type defined by getOptionalChar(String). If no value is at the route,
checks the defaults (#2).route - the route to check the value atget(String)public Optional<Number> getOptionalNumber(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not a Number, returns an empty optional.route - the route to get the number atgetAsOptional(Route, Class)public Optional<Number> getOptionalNumber(@NotNull String route)
Optional. If nothing is present at the
given route, or is not a Number, returns an empty optional.route - the route to get the number atgetAsOptional(String, Class)public Number getNumber(@NotNull Route route)
Number, returns
default defined by root's GeneralSettings.getDefaultNumber(), or value from defaults
(#1).route - the route to get the number atgetNumber(Route, Number)public Number getNumber(@NotNull String route)
Number, returns
default defined by root's GeneralSettings.getDefaultNumber(), or value from defaults
(#1).route - the route to get the number atgetNumber(String, Number)public Number getNumber(@NotNull Route route, @Nullable Number def)
Number, returns
the provided default.route - the route to get the number atdef - the default valuegetOptionalNumber(Route)public Number getNumber(@NotNull String route, @Nullable Number def)
Number, returns
the provided default.route - the route to get the number atdef - the default valuegetOptionalNumber(String)public boolean isNumber(@NotNull
Route route)
true if and only a value at the given route exists, and it is an Number. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isNumber(@NotNull
String route)
true if and only a value at the given route exists, and it is an Number. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Integer> getOptionalInt(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Integer instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.intValue().
route - the route to get the integer atgetAsOptional(Route, Class)public Optional<Integer> getOptionalInt(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Integer instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.intValue().
route - the route to get the integer atgetAsOptional(String, Class)public Integer getInt(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to Integer as defined below), or value from defaults (#1).
Natively, Integer instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.intValue().
route - the route to get the integer atgetInt(Route, Integer)public Integer getInt(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to Integer as defined below), or value from defaults (#1).
Natively, Integer instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.intValue().
route - the route to get the integer atgetInt(String, Integer)public Integer getInt(@NotNull Route route, @Nullable Integer def)
Natively, Integer instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.intValue().
route - the route to get the integer atdef - the default valuegetOptionalInt(Route)public Integer getInt(@NotNull String route, @Nullable Integer def)
Natively, Integer instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.intValue().
route - the route to get the integer atdef - the default valuegetOptionalInt(Route)public boolean isInt(@NotNull
Route route)
true if and only a value at the given route exists, and it is an Integer (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isInt(@NotNull
String route)
true if and only a value at the given route exists, and it is an Integer (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<BigInteger> getOptionalBigInt(@NotNull Route route)
Optional. If nothing is present at
the given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, BigInteger instance is preferred. However, if there is an instance of Number, the value
returned is big integer created from the result of Number.longValue() using BigInteger.valueOf(long).
route - the route to get the big integer atgetAsOptional(Route, Class)public Optional<BigInteger> getOptionalBigInt(@NotNull String route)
Optional. If nothing is present at
the given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, BigInteger instance is preferred. However, if there is an instance of Number, the value
returned is big integer created from the result of Number.longValue() using BigInteger.valueOf(long).
route - the route to get the big integer atgetAsOptional(Route, Class)public BigInteger getBigInt(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to BigInteger as defined below), or value from defaults (#1).
Natively, BigInteger instance is preferred. However, if there is an instance of Number, the value
returned is big integer created from the result of Number.longValue() using BigInteger.valueOf(long).
route - the route to get the big integer atgetBigInt(Route, BigInteger)public BigInteger getBigInt(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to BigInteger as defined below), or value from defaults (#1).
Natively, BigInteger instance is preferred. However, if there is an instance of Number, the value
returned is big integer created from the result of Number.longValue() using BigInteger.valueOf(long).
route - the route to get the big integer atgetBigInt(Route, BigInteger)public BigInteger getBigInt(@NotNull Route route, @Nullable BigInteger def)
Natively, BigInteger instance is preferred. However, if there is an instance of Number, the value
returned is big integer created from the result of Number.longValue() using BigInteger.valueOf(long).
route - the route to get the big integer atdef - the default valuegetOptionalBigInt(Route)public BigInteger getBigInt(@NotNull String route, @Nullable BigInteger def)
Natively, BigInteger instance is preferred. However, if there is an instance of Number, the value
returned is big integer created from the result of Number.longValue() using BigInteger.valueOf(long).
route - the route to get the big integer atdef - the default valuegetOptionalBigInt(String)public boolean isBigInt(@NotNull
Route route)
true if and only a value at the given route exists, and it is a BigInteger. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isBigInt(@NotNull
String route)
true if and only a value at the given route exists, and it is a BigInteger. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Boolean> getOptionalBoolean(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not a Boolean (or the primitive variant), returns an empty optional.route - the route to get the boolean atgetAsOptional(Route, Class)public Optional<Boolean> getOptionalBoolean(@NotNull String route)
Optional. If nothing is present at the
given route, or is not a Boolean (or the primitive variant), returns an empty optional.route - the route to get the boolean atgetAsOptional(String, Class)public Boolean getBoolean(@NotNull Route route)
Boolean (or the
primitive variant), returns default defined by root's GeneralSettings.getDefaultBoolean()or value from defaults (#1).route - the route to get the boolean atgetBoolean(Route, Boolean)public Boolean getBoolean(@NotNull String route)
Boolean (or the
primitive variant), returns default defined by root's GeneralSettings.getDefaultBoolean()or value from defaults (#1).route - the route to get the boolean atgetBoolean(String, Boolean)public Boolean getBoolean(@NotNull Route route, @Nullable Boolean def)
Boolean (or the
primitive variant), returns the provided default.route - the route to get the boolean atdef - the default valuegetOptionalBoolean(Route)public Boolean getBoolean(@NotNull String route, @Nullable Boolean def)
Boolean (or the
primitive variant), returns the provided default.route - the route to get the boolean atdef - the default valuegetOptionalBoolean(String)public boolean isBoolean(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Boolean (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isBoolean(@NotNull
String route)
true if and only a value at the given route exists, and it is a Boolean (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Double> getOptionalDouble(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Double instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.doubleValue().
route - the route to get the double atgetAsOptional(Route, Class)public Optional<Double> getOptionalDouble(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Double instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.doubleValue().
route - the route to get the double atgetAsOptional(String, Class)public Double getDouble(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to Double as defined below), or value from defaults (#1).
Natively, Double instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.doubleValue().
route - the route to get the double atgetDouble(Route, Double)public Double getDouble(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to Double as defined below), or value from defaults (#1).
Natively, Double instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.doubleValue().
route - the route to get the double atgetDouble(String, Double)public Double getDouble(@NotNull Route route, @Nullable Double def)
Natively, Double instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.doubleValue().
route - the route to get the double atdef - the default valuegetOptionalDouble(Route)public Double getDouble(@NotNull String route, @Nullable Double def)
Natively, Double instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.doubleValue().
route - the route to get the double atdef - the default valuegetOptionalDouble(String)public boolean isDouble(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Double (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isDouble(@NotNull
String route)
true if and only a value at the given route exists, and it is a Double (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Float> getOptionalFloat(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Float instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.floatValue().
route - the route to get the float atgetAsOptional(Route, Class)public Optional<Float> getOptionalFloat(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Float instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.floatValue().
route - the route to get the float atgetAsOptional(Route, Class)public Float getFloat(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to Float as defined below), or value from defaults (#1).
Natively, Float instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.floatValue().
route - the route to get the float atgetFloat(Route, Float)public Float getFloat(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to Float as defined below), or value from defaults (#1).
Natively, Float instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.floatValue().
route - the route to get the float atgetFloat(Route, Float)public Float getFloat(@NotNull Route route, @Nullable Float def)
Natively, Float instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.floatValue().
route - the route to get the float atdef - the default valuegetOptionalFloat(Route)public Float getFloat(@NotNull String route, @Nullable Float def)
Natively, Float instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.floatValue().
route - the route to get the float atdef - the default valuegetOptionalFloat(String)public boolean isFloat(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Float (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isFloat(@NotNull
String route)
true if and only a value at the given route exists, and it is a Float (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Byte> getOptionalByte(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Byte instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.byteValue().
route - the route to get the byte atgetAsOptional(Route, Class)public Optional<Byte> getOptionalByte(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Byte instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.byteValue().
route - the route to get the byte atgetAsOptional(String, Class)public Byte getByte(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to Byte as defined below), or value from defaults (#1).
Natively, Byte instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.byteValue().
route - the route to get the byte atgetByte(Route, Byte)public Byte getByte(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to Byte as defined below), or value from defaults (#1).
Natively, Byte instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.byteValue().
route - the route to get the byte atgetByte(String, Byte)public Byte getByte(@NotNull Route route, @Nullable Byte def)
Natively, Byte instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.byteValue().
route - the route to get the byte atdef - the default valuegetOptionalByte(Route)public Byte getByte(@NotNull String route, @Nullable Byte def)
Natively, Byte instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.byteValue().
route - the route to get the byte atdef - the default valuegetOptionalByte(String)public boolean isByte(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Byte (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isByte(@NotNull
String route)
true if and only a value at the given route exists, and it is a Byte (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Long> getOptionalLong(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Long instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.longValue().
route - the route to get the long atgetAsOptional(Route, Class)public Optional<Long> getOptionalLong(String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Long instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.longValue().
route - the route to get the long atgetAsOptional(String, Class)public Long getLong(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to Long as defined below), or value from defaults (#1).
Natively, Long instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.longValue().
route - the route to get the long atgetLong(Route, Long)public Long getLong(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to Long as defined below), or value from defaults (#1).
Natively, Long instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.longValue().
route - the route to get the long atgetLong(Route, Long)public Long getLong(@NotNull Route route, @Nullable Long def)
Natively, Long instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.longValue().
route - the route to get the long atdef - the default valuegetOptionalLong(Route)public Long getLong(@NotNull String route, @Nullable Long def)
Natively, Long instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.longValue().
route - the route to get the long atdef - the default valuegetOptionalLong(String)public boolean isLong(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Long (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isLong(@NotNull
String route)
true if and only a value at the given route exists, and it is a Long (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<Short> getOptionalShort(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Short instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.shortValue().
route - the route to get the short atgetAsOptional(Route, Class)public Optional<Short> getOptionalShort(@NotNull String route)
Optional. If nothing is present at the
given route, or is not an instance of any compatible type (see below), returns an empty optional.
Natively, Short instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.shortValue().
route - the route to get the short atgetAsOptional(String, Class)public Short getShort(@NotNull Route route)
GeneralSettings.getDefaultNumber()
(converted to Short as defined below), or value from defaults (#1).
Natively, Short instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.shortValue().
route - the route to get the short atgetShort(Route, Short)public Short getShort(@NotNull String route)
GeneralSettings.getDefaultNumber()
(converted to Short as defined below), or value from defaults (#1).
Natively, Short instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.shortValue().
route - the route to get the short atgetShort(String, Short)public Short getShort(@NotNull Route route, @Nullable Short def)
Natively, Short instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.shortValue().
route - the route to get the short atdef - the default valuegetOptionalShort(Route)public Short getShort(@NotNull String route, @Nullable Short def)
Natively, Short instance is preferred. However, if there is an instance of Number, the value
returned is the result of Number.shortValue().
route - the route to get the short atdef - the default valuegetOptionalShort(Route)public boolean isShort(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Short (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isShort(@NotNull
String route)
true if and only a value at the given route exists, and it is a Short (or the
primitive variant). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public boolean isDecimal(@NotNull
Route route)
true if and only a value at the given route exists, and it is a Double or Float (or the primitive variants). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isDecimal(@NotNull
String route)
true if and only a value at the given route exists, and it is a Double or Float (or the primitive variants). If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<List<?>> getOptionalList(@NotNull Route route)
Optional. If nothing is present at the
given route, or is not a List, returns an empty optional.route - the route to get the list atgetAsOptional(Route, Class)public Optional<List<?>> getOptionalList(@NotNull String route)
Optional. If nothing is present at the
given route, or is not a List, returns an empty optional.route - the route to get the list atgetAsOptional(String, Class)public List<?> getList(@NotNull Route route)
List, returns
default value defined by root's general settings GeneralSettings.getDefaultList(), or value from defaults.route - the route to get the list atgetList(Route, List)public List<?> getList(@NotNull String route)
List, returns
default value defined by root's general settings GeneralSettings.getDefaultList(), or value from defaults.route - the route to get the list atgetList(String, List)public List<?> getList(@NotNull Route route, @Nullable List<?> def)
List, returns the
provided default.route - the route to get the list atdef - the default valuegetOptionalList(Route)public List<?> getList(@NotNull String route, @Nullable List<?> def)
List, returns the
provided default.route - the route to get the list atdef - the default valuegetOptionalList(String)public boolean isList(@NotNull
Route route)
true if and only a value at the given route exists, and it is a List. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(Route)public boolean isList(@NotNull
String route)
true if and only a value at the given route exists, and it is a List. If no value is at the route, checks the defaults (#2).route - the route to check the value atget(String)public Optional<List<String>> getOptionalStringList(@NotNull Route route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalString(Route), it is skipped and will not appear in the returned list.
route - the route to get the string list atgetOptionalList(Route),
getOptionalString(Route)public Optional<List<String>> getOptionalStringList(@NotNull String route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalString(String), it is skipped and will not appear in the returned list.
route - the route to get the string list atgetOptionalList(String),
getOptionalString(String)public List<String> getStringList(@NotNull Route route, @Nullable List<String> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalString(Route), it is skipped and will not appear in the returned list.
route - the route to get the string list atdef - the default valuegetOptionalStringList(Route),
getOptionalString(Route)public List<String> getStringList(@NotNull String route, @Nullable List<String> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalString(String), it is skipped and will not appear in the returned list.
route - the route to get the string list atdef - the default valuegetOptionalStringList(String),
getOptionalString(String)public List<String> getStringList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalString(Route), it is skipped and will not appear in the returned list.
route - the route to get the string list atgetStringList(Route, List),
getOptionalString(Route)public List<String> getStringList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalString(String), it is skipped and will not appear in the returned list.
route - the route to get the string list atgetStringList(String, List),
getOptionalString(String)public Optional<List<Integer>> getOptionalIntList(@NotNull Route route)
Optional. If nothing is
present at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalInt(Route), it is skipped and will not appear in the returned list.
route - the route to get the integer list atgetOptionalList(Route),
getOptionalInt(Route)public Optional<List<Integer>> getOptionalIntList(@NotNull String route)
Optional. If nothing is
present at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalInt(String), it is skipped and will not appear in the returned list.
route - the route to get the integer list atgetOptionalList(String),
getOptionalInt(String)public List<Integer> getIntList(@NotNull Route route, @Nullable List<Integer> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalInt(Route), it is skipped and will not appear in the returned list.
route - the route to get the integer list atdef - the default valuegetOptionalIntList(Route),
getOptionalInt(Route)public List<Integer> getIntList(@NotNull String route, @Nullable List<Integer> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalInt(String), it is skipped and will not appear in the returned list.
route - the route to get the integer list atdef - the default valuegetOptionalIntList(String),
getOptionalInt(String)public List<Integer> getIntList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalInt(Route), it is skipped and will not appear in the returned list.
route - the route to get the integer list atgetIntList(Route, List),
getOptionalInt(Route)public List<Integer> getIntList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalInt(String), it is skipped and will not appear in the returned list.
route - the route to get the integer list atgetIntList(String, List),
getOptionalInt(String)public Optional<List<BigInteger>> getOptionalBigIntList(@NotNull Route route)
Optional. If nothing is
present at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalBigInt(Route), it is skipped and will not appear in the returned list.
route - the route to get the big integer list atgetOptionalList(Route),
getOptionalBigInt(Route)public Optional<List<BigInteger>> getOptionalBigIntList(@NotNull String route)
Optional. If nothing is
present at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalBigInt(String), it is skipped and will not appear in the returned list.
route - the route to get the big integer list atgetOptionalList(String),
getOptionalBigInt(String)public List<BigInteger> getBigIntList(@NotNull Route route, @Nullable List<BigInteger> def)
List, returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalBigInt(Route), it is skipped and will not appear in the returned list.
route - the route to get the big integer list atdef - the default valuegetOptionalBigIntList(Route),
getOptionalBigInt(Route)public List<BigInteger> getBigIntList(@NotNull String route, @Nullable List<BigInteger> def)
List, returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalBigInt(String), it is skipped and will not appear in the returned list.
route - the route to get the big integer list atdef - the default valuegetOptionalBigIntList(String),
getOptionalBigInt(String)public List<BigInteger> getBigIntList(@NotNull Route route)
List, returns default defined by root's GeneralSettings.getDefaultList()or value
from defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalBigInt(Route), it is skipped and will not appear in the returned list.
route - the route to get the big integer list atgetBigIntList(Route, List),
getOptionalBigInt(Route)public List<BigInteger> getBigIntList(@NotNull String route)
List, returns default defined by root's GeneralSettings.getDefaultList()or value
from defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalBigInt(String), it is skipped and will not appear in the returned list.
route - the route to get the big integer list atgetBigIntList(String, List),
getOptionalBigInt(String)public Optional<List<Byte>> getOptionalByteList(@NotNull Route route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalByte(Route), it is skipped and will not appear in the returned list.
route - the route to get the byte list atgetOptionalList(Route),
getOptionalByte(Route)public Optional<List<Byte>> getOptionalByteList(@NotNull String route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalByte(String), it is skipped and will not appear in the returned list.
route - the route to get the byte list atgetOptionalList(String),
getOptionalByte(String)public List<Byte> getByteList(@NotNull Route route, @Nullable List<Byte> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalByte(Route), it is skipped and will not appear in the returned list.
route - the route to get the byte list atdef - the default valuegetOptionalByteList(Route),
getOptionalByte(Route)public List<Byte> getByteList(@NotNull String route, @Nullable List<Byte> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalByte(String), it is skipped and will not appear in the returned list.
route - the route to get the byte list atdef - the default valuegetOptionalByteList(String),
getOptionalByte(String)public List<Byte> getByteList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalByte(Route), it is skipped and will not appear in the returned list.
route - the route to get the byte list atgetByteList(Route, List),
getOptionalByte(Route)public List<Byte> getByteList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalByte(String), it is skipped and will not appear in the returned list.
route - the route to get the byte list atgetByteList(String, List),
getOptionalByte(String)public Optional<List<Long>> getOptionalLongList(@NotNull Route route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalLong(Route), it is skipped and will not appear in the returned list.
route - the route to get the long list atgetOptionalList(Route),
getOptionalLong(Route)public Optional<List<Long>> getOptionalLongList(@NotNull String route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalLong(String), it is skipped and will not appear in the returned list.
route - the route to get the long list atgetOptionalList(String),
getOptionalLong(String)public List<Long> getLongList(@NotNull Route route, @Nullable List<Long> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalLong(Route), it is skipped and will not appear in the returned list.
route - the route to get the long list atdef - the default valuegetOptionalLongList(Route),
getOptionalLong(Route)public List<Long> getLongList(@NotNull String route, @Nullable List<Long> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalLong(String), it is skipped and will not appear in the returned list.
route - the route to get the long list atdef - the default valuegetOptionalLongList(String),
getOptionalLong(String)public List<Long> getLongList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalLong(Route), it is skipped and will not appear in the returned list.
route - the route to get the long list atgetLongList(Route, List),
getOptionalLong(Route)public List<Long> getLongList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalLong(String), it is skipped and will not appear in the returned list.
route - the route to get the long list atgetLongList(String, List),
getOptionalLong(String)public Optional<List<Double>> getOptionalDoubleList(@NotNull Route route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalDouble(Route), it is skipped and will not appear in the returned list.
route - the route to get the double list atgetOptionalList(Route),
getOptionalDouble(Route)public Optional<List<Double>> getOptionalDoubleList(@NotNull String route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalDouble(String), it is skipped and will not appear in the returned list.
route - the route to get the double list atgetOptionalList(String),
getOptionalDouble(String)public List<Double> getDoubleList(@NotNull Route route, @Nullable List<Double> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalDouble(Route), it is skipped and will not appear in the returned list.
route - the route to get the double list atdef - the default valuegetOptionalDoubleList(Route),
getOptionalDouble(Route)public List<Double> getDoubleList(@NotNull String route, @Nullable List<Double> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalDouble(String), it is skipped and will not appear in the returned list.
route - the route to get the double list atdef - the default valuegetOptionalDoubleList(String),
getOptionalDouble(String)public List<Double> getDoubleList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalDouble(Route), it is skipped and will not appear in the returned list.
route - the route to get the double list atgetDoubleList(Route, List),
getOptionalDouble(Route)public List<Double> getDoubleList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalDouble(String), it is skipped and will not appear in the returned list.
route - the route to get the double list atgetDoubleList(String, List),
getOptionalDouble(String)public Optional<List<Float>> getOptionalFloatList(@NotNull Route route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalFloat(Route), it is skipped and will not appear in the returned list.
route - the route to get the float list atgetOptionalList(Route),
getOptionalFloat(Route)public Optional<List<Float>> getOptionalFloatList(@NotNull String route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalFloat(String), it is skipped and will not appear in the returned list.
route - the route to get the float list atgetOptionalList(String),
getOptionalFloat(String)public List<Float> getFloatList(@NotNull Route route, @Nullable List<Float> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalFloat(Route), it is skipped and will not appear in the returned list.
route - the route to get the float list atdef - the default valuegetOptionalFloatList(Route),
getOptionalFloat(Route)public List<Float> getFloatList(@NotNull String route, @Nullable List<Float> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalFloat(String), it is skipped and will not appear in the returned list.
route - the route to get the float list atdef - the default valuegetOptionalFloatList(String),
getOptionalFloat(String)public List<Float> getFloatList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalFloat(Route), it is skipped and will not appear in the returned list.
route - the route to get the float list atgetFloatList(Route, List),
getOptionalFloat(Route)public List<Float> getFloatList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalFloat(String), it is skipped and will not appear in the returned list.
route - the route to get the float list atgetFloatList(String, List),
getOptionalFloat(String)public Optional<List<Short>> getOptionalShortList(@NotNull Route route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalShort(Route), it is skipped and will not appear in the returned list.
route - the route to get the short list atgetOptionalList(Route),
getOptionalShort(Route)public Optional<List<Short>> getOptionalShortList(@NotNull String route)
Optional. If nothing is present
at the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalShort(String), it is skipped and will not appear in the returned list.
route - the route to get the short list atgetOptionalList(String),
getOptionalShort(String)public List<Short> getShortList(@NotNull Route route, @Nullable List<Short> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalShort(Route), it is skipped and will not appear in the returned list.
route - the route to get the short list atdef - the default valuegetOptionalShortList(Route),
getOptionalShort(Route)public List<Short> getShortList(@NotNull String route, @Nullable List<Short> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalShort(String), it is skipped and will not appear in the returned list.
route - the route to get the short list atdef - the default valuegetOptionalShortList(String),
getOptionalShort(String)public List<Short> getShortList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalShort(Route), it is skipped and will not appear in the returned list.
route - the route to get the short list atgetShortList(Route, List),
getOptionalShort(Route)public List<Short> getShortList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not compatible as documented at
getOptionalShort(String), it is skipped and will not appear in the returned list.
route - the route to get the short list atgetShortList(String, List),
getOptionalShort(String)public Optional<List<Map<?,?>>> getOptionalMapList(@NotNull Route route)
Optional. If nothing is present at
the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not an instance of Map, it
is skipped and will not appear in the returned list.
Please note that this method does not clone the maps returned - mutating them affects the list stored in
the section. It is, however, if needed, still recommended to call set(Route, Object) afterwards.
route - the route to get the map list atgetOptionalList(Route)public Optional<List<Map<?,?>>> getOptionalMapList(@NotNull String route)
Optional. If nothing is present at
the given route, or is not a List, returns an empty optional.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not an instance of Map, it
is skipped and will not appear in the returned list.
Please note that this method does not clone the maps returned - mutating them affects the list stored in
the section. It is, however, if needed, still recommended to call set(String, Object) afterwards.
route - the route to get the map list atgetOptionalList(String)public List<Map<?,?>> getMapList(@NotNull Route route, @Nullable List<Map<?,?>> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not an instance of Map, it
is skipped and will not appear in the returned list.
Please note that this method does not clone the maps returned - mutating them affects the list stored in
the section (unless the default value is returned). It is, however, if needed, still recommended to call set(Route, Object) afterwards.
route - the route to get the map list atdef - the default valuegetOptionalMapList(Route)public List<Map<?,?>> getMapList(@NotNull String route, @Nullable List<Map<?,?>> def)
List,
returns the provided default.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not an instance of Map, it
is skipped and will not appear in the returned list.
Please note that this method does not clone the maps returned - mutating them affects the list stored in
the section (unless the default value is returned). It is, however, if needed, still recommended to call set(String, Object) afterwards.
route - the route to get the map list atdef - the default valuegetOptionalMapList(String)public List<Map<?,?>> getMapList(@NotNull Route route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not an instance of Map, it
is skipped and will not appear in the returned list.
Please note that this method does not clone the maps returned - mutating them affects the list stored in
the section (unless the default value is returned). It is, however, if needed, still recommended to call set(Route, Object) afterwards.
route - the route to get the map list atgetMapList(Route, List)public List<Map<?,?>> getMapList(@NotNull String route)
List,
returns default defined by root's GeneralSettings.getDefaultList()or value from
defaults.
This method creates and returns a new instance of root's GeneralSettings.getDefaultList(), with the
elements re-added (to the target/returned list) from the (source) list at the given route one by one, in order
determined by the list iterator. If any of the elements of the source list is not an instance of Map, it
is skipped and will not appear in the returned list.
Please note that this method does not clone the maps returned - mutating them affects the list stored in
the section (unless the default value is returned). It is, however, if needed, still recommended to call set(String, Object) afterwards.
route - the route to get the map list atgetMapList(String, List)Copyright © 2022. All rights reserved.