Class Link

  • Direct Known Subclasses:
    FileLink

    public class Link
    extends Object
    Link to a given web resource. The resource is defined by the URL at which it can be accessed through the Web.
    • Field Detail

      • EMPTY_LINK

        public static final Link EMPTY_LINK
        An empty link is a link whose the URL and label is an empty string.
    • Constructor Detail

      • Link

        public Link​(String linkUrl,
                    String linkLabel)
        Constructs a new link with the specified URL and labels.
        Parameters:
        linkUrl - the URL of the linked resource.
        linkLabel - the label to render for that link.
    • Method Detail

      • getLinkUrl

        public String getLinkUrl()
        Gets the URL of the resource referred by this link.
        Returns:
        the resource URL.
      • getLinkLabel

        public String getLinkLabel()
        Gets the label with which this link should be referred.
        Returns:
        this link's label.