public abstract class OdinElement
extends java.lang.Object
Constructor and Description |
---|
OdinElement() |
Modifier and Type | Method and Description |
---|---|
OdinArray |
asArray() |
OdinNode |
asNode() |
<T> OdinObject<T> |
asObject() |
void |
buildExtra(java.util.function.Consumer<OdinExtra> consumer)
Build the element extra by using a consumer.
If this element already contains extra, the consumer is called with it, else new extra data is created. |
OdinExtra |
getExtra()
Get extra defined for this element.
Extra contains comments and empty lines that appear before this element if the odn output. |
boolean |
hasExtra()
Get if extra is defined for this element.
Extra contains comments and empty lines that appear before this element if the odn output. |
boolean |
isArray() |
boolean |
isNode() |
boolean |
isObject() |
void |
setExtra(OdinExtra extra)
Set the extra of this element.
Extra contains comments and empty lines that appear before this element if the odn output. |
public boolean hasExtra()
public OdinExtra getExtra()
public void setExtra(OdinExtra extra)
extra
- extra to setpublic boolean isNode()
public boolean isArray()
public boolean isObject()
public OdinNode asNode()
public OdinArray asArray()
public <T> OdinObject<T> asObject()
public void buildExtra(java.util.function.Consumer<OdinExtra> consumer)
consumer
- extra consumergetExtra()