Interface YamlElement
- All Superinterfaces:
Comparable<YamlConfiguration>, YamlConfiguration
- All Known Subinterfaces:
YamlArray, YamlObject
Yaml element.
-
Method Summary
Modifier and TypeMethodDescription@NotNull YamlArrayasArray()Gets this element as an arraybooleanGets this element as a booleandoubleasDouble()Gets this element as a doublefloatasFloat()Gets this element as a floatintasInt()Gets this element as an intlongasLong()Gets this element as along@NotNull YamlObjectasObject()Gets this element as an object@NotNull StringasString()Gets this element as a string@NotNull Objectget()Gets an original raw objectMethods inherited from interface YamlConfiguration
compareTo, path
-
Method Details
-
get
-
asString
Gets this element as a string- Returns:
- string
- Throws:
UnsupportedOperationException- if type is different.
-
asInt
int asInt()Gets this element as an int- Returns:
- int
- Throws:
UnsupportedOperationException- if type is different.
-
asFloat
float asFloat()Gets this element as a float- Returns:
- float
- Throws:
UnsupportedOperationException- if type is different.
-
asDouble
double asDouble()Gets this element as a double- Returns:
- double
- Throws:
UnsupportedOperationException- if type is different.
-
asLong
long asLong()Gets this element as along- Returns:
- long
- Throws:
UnsupportedOperationException- if type is different.
-
asBoolean
boolean asBoolean()Gets this element as a boolean- Returns:
- boolean
- Throws:
UnsupportedOperationException- if type is different.
-
asArray
Gets this element as an array- Returns:
- array
- Throws:
UnsupportedOperationException- if type is different.
-
asObject
Gets this element as an object- Returns:
- object
- Throws:
UnsupportedOperationException- if type is different.
-