Class YAMLDocument

java.lang.Object
net.pwall.yaml.YAMLDocument
All Implemented Interfaces:
Serializable

public class YAMLDocument extends Object implements Serializable
A parsed YAML document.
Author:
Peter Wall
See Also:
  • Field Details

  • Constructor Details

    • YAMLDocument

      public YAMLDocument(YAMLNode rootNode, int majorVersion, int minorVersion)
      Construct a YAMLDocument with the supplied root node, major version number and minor version number
      Parameters:
      rootNode - The root node
      majorVersion - The major version number
      minorVersion - The minor version number
    • YAMLDocument

      public YAMLDocument(YAMLNode rootNode)
      Construct a YAMLDocument with the supplied root node and default version numbers
      Parameters:
      rootNode - The root node
  • Method Details

    • getRootNode

      public YAMLNode getRootNode()
      Get the root node of the document.
      Returns:
      the root node
    • getMajorVersion

      public int getMajorVersion()
      Get the major version number.
      Returns:
      the major version number
    • getMinorVersion

      public int getMinorVersion()
      Get the minor version number.
      Returns:
      the minor version number