public final class StrictYamlSequence extends Object
YamlSequence
which throws YamlNodeNotFoundException
if any of the methods of the decorated YamlSequence returns null
(if the given index points to a YamlNode that is not a YamlMapping,
for instance).Constructor and Description |
---|
StrictYamlSequence(YamlSequence decorated)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(YamlNode other)
Compare this Sequence to another node.
A Sequence is always considered greater than a Scalar and less than a Mapping. If other is a Sequence, their integer lengths are compared - the one with the greater length is considered greater. |
boolean |
equals(Object other)
Equals method for YamlSequence.
|
int |
hashCode() |
Iterator<YamlNode> |
iterator()
Returns this YamlSequence's children Iterator.
It is equivalent to YamlSequence.values().iterator(). |
int |
size()
The number of Yaml elements (scalars, mappings and sequences) found in
this sequence.
|
String |
string(int index)
Get the String from the given index.
|
String |
toString() |
Collection<YamlNode> |
values()
Fetch the values.
|
YamlMapping |
yamlMapping(int index)
Get the Yaml mapping from the given index.
|
YamlSequence |
yamlSequence(int index)
Get the Yaml sequence from the given index.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
date, dateTime, doubleNumber, floatNumber, indent, integer, longNumber
forEach, spliterator
public StrictYamlSequence(YamlSequence decorated)
decorated
- Original YamlSequencepublic Collection<YamlNode> values()
YamlNode
YamlNode
public YamlMapping yamlMapping(int index)
index
- Integer index.public YamlSequence yamlSequence(int index)
index
- Integer index.public String string(int index)
index
- Integer index.public int size()
YamlSequence
public Iterator<YamlNode> iterator()
YamlSequence
public boolean equals(Object other)
public int compareTo(YamlNode other)
compareTo
in interface Comparable<YamlNode>
other
- The other YamlNode.Copyright © 2020. All rights reserved.