Class Href

  • All Implemented Interfaces:
    TagBase, AAttributable, AreaAttributable, BaseAttributable, java.io.Serializable, java.lang.Cloneable


    public class Href
    extends AbstractAttribute
    implements AAttributable, AreaAttributable, BaseAttributable
    This was the single required attribute for anchors defining a hypertext source link, but is no longer required in HTML5. Omitting this attribute creates a placeholder link. The href attribute indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • Href

        public Href​(java.lang.String url)
        This was the single required attribute for anchors defining a hypertext source link, but is no longer required in HTML5. Omitting this attribute creates a placeholder link. The href attribute indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.
        Parameters:
        url - the url.
        Since:
        1.0.0
    • Method Detail

      • setValue

        public void setValue​(java.lang.String url)
        sets the value for this attribute
        Parameters:
        url - the url.
        Since:
        1.0.0
      • getValue

        public java.lang.String getValue​()
        gets the value of this attribute
        Returns:
        the url.
        Since:
        1.0.0
      • init

        protected void init​()
        invokes only once per object
        Since:
        1.0.0