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
Base class for the two collection types
mapping and collection.-
Field Summary
Fields inherited from class org.yaml.snakeyaml.nodes.Node
endMark, resolved, useClassConstructor -
Constructor Summary
ConstructorsConstructorDescriptionCollectionNode(Tag tag, Mark startMark, Mark endMark, Boolean flowStyle) Deprecated.Since restored in v1.22.CollectionNode(Tag tag, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle) Create -
Method Summary
Modifier and TypeMethodDescriptionSerialization style of this collection.getValue()Returns the elements in this sequence.voidsetEndMark(Mark endMark) SettervoidsetFlowStyle(Boolean flowStyle) Deprecated.voidsetFlowStyle(DumperOptions.FlowStyle flowStyle) SetterMethods 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
-
Constructor Details
-
CollectionNode
Create- Parameters:
tag- - its tagstartMark- - startendMark- - endflowStyle- - style
-
CollectionNode
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 Details
-
getValue
Returns the elements in this sequence.- Returns:
- Nodes in the specified order.
-
getFlowStyle
Serialization style of this collection.- Returns:
truefor flow style,falsefor block style.
-
setFlowStyle
Setter- Parameters:
flowStyle- - flow style for collections
-
setFlowStyle
Deprecated. -
setEndMark
Setter- Parameters:
endMark- - end
-