Class WikiTextList

All Implemented Interfaces:
WikiTextElement

public class WikiTextList extends WikiTextParentNode implements WikiTextElement
Represents a list in Wikitext.
Intentionally calling this a WikiTextList to avoid colliding with java.util.List
  • Constructor Details

    • WikiTextList

      public WikiTextList(ListType type, List<WikiTextNode> content)
      Creates a list without a title.
      Parameters:
      type - What type of list it is.
      content - The list items.
    • WikiTextList

      public WikiTextList(ListType type, Optional<String> title, List<WikiTextNode> content)
      Creates a list with title.
      Parameters:
      type - What type of list it is.
      title - The list title.
      content - The list items.
  • 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