Interface YamlArray
- All Superinterfaces:
Comparable<YamlConfiguration>, Iterable<YamlElement>, YamlConfiguration, YamlElement
Yaml array.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull YamlArrayasArray()Gets this element as an arraydefault booleanGets this element as a booleandefault doubleasDouble()Gets this element as a doubledefault floatasFloat()Gets this element as a floatdefault intasInt()Gets this element as an intdefault longasLong()Gets this element as alongdefault @NotNull YamlObjectasObject()Gets this element as an objectdefault @NotNull StringasString()Gets this element as a stringget()Gets an array as a list.Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface YamlConfiguration
compareTo, path
-
Method Details
-
get
Gets an array as a list.- Specified by:
getin interfaceYamlElement- Returns:
- raw list
-
asString
Gets this element as a string- Specified by:
asStringin interfaceYamlElement- Returns:
- string
- Throws:
UnsupportedOperationException- if type is different.
-
asInt
default int asInt()Gets this element as an int- Specified by:
asIntin interfaceYamlElement- Returns:
- int
- Throws:
UnsupportedOperationException- if type is different.
-
asFloat
default float asFloat()Gets this element as a float- Specified by:
asFloatin interfaceYamlElement- Returns:
- float
- Throws:
UnsupportedOperationException- if type is different.
-
asDouble
default double asDouble()Gets this element as a double- Specified by:
asDoublein interfaceYamlElement- Returns:
- double
- Throws:
UnsupportedOperationException- if type is different.
-
asBoolean
default boolean asBoolean()Gets this element as a boolean- Specified by:
asBooleanin interfaceYamlElement- Returns:
- boolean
- Throws:
UnsupportedOperationException- if type is different.
-
asLong
default long asLong()Gets this element as along- Specified by:
asLongin interfaceYamlElement- Returns:
- long
- Throws:
UnsupportedOperationException- if type is different.
-
asArray
Gets this element as an array- Specified by:
asArrayin interfaceYamlElement- Returns:
- array
- Throws:
UnsupportedOperationException- if type is different.
-
asObject
Gets this element as an object- Specified by:
asObjectin interfaceYamlElement- Returns:
- object
- Throws:
UnsupportedOperationException- if type is different.
-