Node.add

Add an element to a sequence.

This method can only be called on sequence nodes.

If value is a node, it is copied to the sequence directly. Otherwise value is converted to a node and then stored in the sequence.

When emitting, all values in the sequence will be emitted. When using the !!set tag, the user needs to ensure that all elements in the sequence are unique, otherwise invalid YAML code will be emitted.

  1. void add(T value)
    struct Node
    void
    add
    (
    T
    )
    ()
  2. void add(K key, V value)

Meta