Package org.yaml.snakeyaml.nodes
Class CollectionNode<T>
- java.lang.Object
-
- org.yaml.snakeyaml.nodes.Node
-
- org.yaml.snakeyaml.nodes.CollectionNode<T>
-
- Direct Known Subclasses:
MappingNode
,SequenceNode
public abstract class CollectionNode<T> extends Node
Base class for the two collection typesmapping
andcollection
.
-
-
Field Summary
Fields Modifier and Type Field Description private DumperOptions.FlowStyle
flowStyle
-
Fields inherited from class org.yaml.snakeyaml.nodes.Node
endMark, resolved, useClassConstructor
-
-
Constructor Summary
Constructors Constructor Description CollectionNode(Tag tag, Mark startMark, Mark endMark, java.lang.Boolean flowStyle)
Deprecated.Since restored in v1.22.CollectionNode(Tag tag, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle)
Create
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DumperOptions.FlowStyle
getFlowStyle()
Serialization style of this collection.abstract java.util.List<T>
getValue()
Returns the elements in this sequence.void
setEndMark(Mark endMark)
Settervoid
setFlowStyle(java.lang.Boolean flowStyle)
Deprecated.void
setFlowStyle(DumperOptions.FlowStyle flowStyle)
Setter-
Methods inherited from class org.yaml.snakeyaml.nodes.Node
equals, getAnchor, getBlockComments, getEndComments, getEndMark, getInLineComments, getNodeId, getStartMark, getTag, getType, hashCode, isResolved, isTwoStepsConstruction, setAnchor, setBlockComments, setEndComments, setInLineComments, setTag, setTwoStepsConstruction, setType, setUseClassConstructor, useClassConstructor
-
-
-
-
Field Detail
-
flowStyle
private DumperOptions.FlowStyle flowStyle
-
-
Constructor Detail
-
CollectionNode
public CollectionNode(Tag tag, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle)
Create- Parameters:
tag
- - its tagstartMark
- - startendMark
- - endflowStyle
- - style
-
CollectionNode
@Deprecated public CollectionNode(Tag tag, Mark startMark, Mark endMark, java.lang.Boolean flowStyle)
Deprecated.Since restored in v1.22. UseCollectionNode(Tag, Mark, Mark, org.yaml.snakeyaml.DumperOptions.FlowStyle)
.Existed in older versions but replaced withDumperOptions.FlowStyle
-based constructor. Restored in v1.22 for backwards compatibility.
-
-
Method Detail
-
getValue
public abstract java.util.List<T> getValue()
Returns the elements in this sequence.- Returns:
- Nodes in the specified order.
-
getFlowStyle
public DumperOptions.FlowStyle getFlowStyle()
Serialization style of this collection.- Returns:
true
for flow style,false
for block style.
-
setFlowStyle
public void setFlowStyle(DumperOptions.FlowStyle flowStyle)
Setter- Parameters:
flowStyle
- - flow style for collections
-
setFlowStyle
@Deprecated public void setFlowStyle(java.lang.Boolean flowStyle)
Deprecated.
-
setEndMark
public void setEndMark(Mark endMark)
Setter- Parameters:
endMark
- - end
-
-