All Implemented Interfaces:
WikiTextElement

public class Section extends WikiTextParentNode implements WikiTextElement
The contents of a section.
WikiText: ## Section title ##\n content
XML: section
  • Constructor Details

    • Section

      public Section(String title, Integer level, List<WikiTextNode> content)
      Creates a section.
      Parameters:
      title - The section title
      level - The size of the section, from 1-6.
      content - The contents of the section.
  • Method Details

    • accept

      public <T> Optional<T> accept(WikiTextASTVisitor<T> visitor)
      Description copied from class: WikiTextNode
      Hook for an AST visitor.
      Specified by:
      accept in class WikiTextNode
      Type Parameters:
      T - Whatever the visitor produces.
      Parameters:
      visitor - The visitor doing the visitor.
      Returns:
      Whatever the visitor produced.
    • getAttributes

      public List<NodeAttribute> getAttributes()
      Description copied from class: WikiTextNode
      Base case for getting element attributes. Most nodes have no attributes
      Overrides:
      getAttributes in class WikiTextNode
      Returns:
      Attributes