Class CategoryList

All Implemented Interfaces:
WikiTextElement

public class CategoryList extends WikiTextParentNode
A list of categories that the article belongs to. This is a special child of the root article that is always one level below the root node.
  • Constructor Details

    • CategoryList

      protected CategoryList(List<WikiTextNode> content)
      Creates a category list from a list of nodes.
      Parameters:
      content - The category nodes
  • Method Details

    • from

      public static CategoryList from(Set<String> categories)
      Convenience method to create a list of categories.
      Parameters:
      categories - The article categories as strings.
      Returns:
      The category node.
    • 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.