Class CategoryList
java.lang.Object
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextParentNode
com.lucaskjaerozhang.wikitext_parser.ast.root.CategoryList
- All Implemented Interfaces:
WikiTextElement
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Categories contained within the list. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CategoryList
(List<WikiTextNode> content) Creates a category list from a list of nodes. -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T>
accept
(WikiTextASTVisitor<T> visitor) Hook for an AST visitor.static CategoryList
Convenience method to create a list of categories.Methods inherited from class com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextParentNode
getCategories, getFieldValuesFromChildren, rebuildWithContext
Methods inherited from class com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
getAttributes
-
Constructor Details
-
CategoryList
Creates a category list from a list of nodes.- Parameters:
content
- The category nodes
-
-
Method Details
-
from
Convenience method to create a list of categories.- Parameters:
categories
- The article categories as strings.- Returns:
- The category node.
-
accept
Description copied from class:WikiTextNode
Hook for an AST visitor.- Specified by:
accept
in classWikiTextNode
- Type Parameters:
T
- Whatever the visitor produces.- Parameters:
visitor
- The visitor doing the visitor.- Returns:
- Whatever the visitor produced.
-