Class UnnamedExternalLink

java.lang.Object
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
com.lucaskjaerozhang.wikitext_parser.ast.link.UnnamedExternalLink
All Implemented Interfaces:
WikiTextElement

public class UnnamedExternalLink extends WikiTextNode implements WikiTextElement
A link that goes outside of the wiki which gets automatic numbering rather than display text.
WikiText: [link]
XML: link
  • Constructor Details

    • UnnamedExternalLink

      public UnnamedExternalLink(String href, Boolean hasArrow)
      Creates an external link without a name.
      Parameters:
      href - The link target
      hasArrow - Whether an arrow should be displayed on the link.
  • Method Details

    • 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
    • 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.