All Implemented Interfaces:
TagBase, AAttributable, AreaAttributable, Serializable, Cloneable

public class HrefLang extends AbstractAttribute implements AAttributable, AreaAttributable
This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47 for HTML5 and by RFC1766 for HTML4. Use this attribute only if the href attribute is present.
Since:
1.0.0
See Also:
  • Constructor Details

    • HrefLang

      public HrefLang(String languageCode)
      This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47 for HTML5 and by RFC1766 for HTML4. Use this attribute only if the href attribute is present.
      Parameters:
      languageCode - the languageCode.
      Since:
      1.0.0
    • HrefLang

      public HrefLang(Locale language)
      This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47 for HTML5 and by RFC1766 for HTML4. Use this attribute only if the href attribute is present.
      Parameters:
      language - the Locale object for language.
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String languageCode)
      sets the value for this attribute
      Parameters:
      languageCode - the languageCode.
      Since:
      1.0.0
    • setValue

      public void setValue(Locale language)
      sets the value for this attribute
      Parameters:
      language - the Locale object for language.
      Since:
      1.0.0
    • getLocale

      public Locale getLocale()
    • getValue

      public String getValue()
      gets the value of this attribute
      Returns:
      the languageCode.
      Since:
      1.0.0
    • init

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