Class WikiTextList
java.lang.Object
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextParentNode
com.lucaskjaerozhang.wikitext_parser.ast.list.WikiTextList
- All Implemented Interfaces:
WikiTextElement
Represents a list in Wikitext.
Intentionally calling this a WikiTextList to avoid colliding with java.util.List
Intentionally calling this a WikiTextList to avoid colliding with java.util.List
-
Constructor Summary
ConstructorsConstructorDescriptionWikiTextList
(ListType type, List<WikiTextNode> content) Creates a list without a title.WikiTextList
(ListType type, Optional<String> title, List<WikiTextNode> content) Creates a list with title. -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T>
accept
(WikiTextASTVisitor<T> visitor) Hook for an AST visitor.Base case for getting element attributes.Methods inherited from class com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextParentNode
getCategories, getFieldValuesFromChildren, rebuildWithContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextElement
getCategories
-
Constructor Details
-
WikiTextList
Creates a list without a title.- Parameters:
type
- What type of list it is.content
- The list items.
-
WikiTextList
Creates a list with title.- Parameters:
type
- What type of list it is.title
- The list title.content
- The list items.
-
-
Method Details
-
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.
-
getAttributes
Description copied from class:WikiTextNode
Base case for getting element attributes. Most nodes have no attributes- Overrides:
getAttributes
in classWikiTextNode
- Returns:
- Attributes
-