Class Link


  • public class Link
    extends Node
    A link with a destination and an optional title; the link text is in child nodes.

    Example for an inline link in a CommonMark document:

    
     [link](/uri "title")
     

    The corresponding Link node would look like this:

    Note that the text in the link can contain inline formatting, so it could also contain an Image or Emphasis, etc.

    See Also:
    CommonMark Spec for links
    • Field Detail

      • destination

        private java.lang.String destination
      • title

        private java.lang.String title
    • Constructor Detail

      • Link

        public Link()
      • Link

        public Link​(java.lang.String destination,
                    java.lang.String title)
    • Method Detail

      • accept

        public void accept​(Visitor visitor)
        Specified by:
        accept in class Node
      • getDestination

        public java.lang.String getDestination()
      • setDestination

        public void setDestination​(java.lang.String destination)
      • getTitle

        public java.lang.String getTitle()
        Returns:
        the title or null
      • setTitle

        public void setTitle​(java.lang.String title)
      • toStringAttributes

        protected java.lang.String toStringAttributes()
        Overrides:
        toStringAttributes in class Node