package org.commonmark.node;

public class Link extends Node {

    private String destination;
    private String title;

    public Link() {
    }

    public Link(String destination, String title) {
        this.destination = destination;
        this.title = title;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    protected String toStringAttributes() {
        return "destination=" + destination + ", title=" + title;
    }
}

@@ -23,16 +23,753 @@
 .node;%0A%0A
+/**%0A * A link with a destination and an optional title; the link text is in child nodes.%0A * %3Cp%3E%0A * Example for an inline link in a CommonMark document:%0A * %3Cpre%3E%3Ccode%3E%0A * %5Blink%5D(/uri %22title%22)%0A * %3C/code%3E%3C/pre%3E%0A * %3Cp%3E%0A * The corresponding Link node would look like this:%0A * %3Cul%3E%0A * %3Cli%3E%7B@link #getDestination()%7D returns %7B@code %22/uri%22%7D%0A * %3Cli%3E%7B@link #getTitle()%7D returns %7B@code %22title%22%7D%0A * %3Cli%3EA %7B@link Text%7D child node with %7B@link Text#getLiteral() getLiteral%7D that returns %7B@code %22link%22%7D%3C/li%3E%0A * %3C/ul%3E%0A * %3Cp%3E%0A * Note that the text in the link can contain inline formatting, so it could also contain an %7B@link Image%7D or%0A * %7B@link Emphasis%7D, etc.%0A *%0A * @see %3Ca href=%22http://spec.commonmark.org/0.26/#links%22%3ECommonMark Spec for links%3C/a%3E%0A */%0A
 public c

Add Javadoc for Link nodes