Class Underline<T extends Underline<T>>


public class Underline<T extends Underline<T>> extends U<T>
Represents an HTML <u> element, providing a more descriptive alias for underlined text.

This class extends the U class and provides an alternative, more verbose name for creating underlined text elements. It inherits all functionality from the U parent class without adding new features, serving as a semantic alias that may be more self-documenting in some contexts. The element should be used for unarticulated, though explicitly rendered, non-textual annotations rather than simple visual styling.

Features:

  • Provides a descriptive alias for the <u> HTML element
  • Renders text with underline decoration
  • Supports text initialization through constructor
  • Inherits all functionality from U
  • Ideal for developers who prefer verbose, self-documenting class names

Usage:


 // Create underlined text using verbose name
 Underline important = new Underline("Important term");

 // Use in sentence
 P paragraph = new P();
 paragraph.addElement(new Text("Please note the "));
 paragraph.addElement(new Underline("special condition"));
 paragraph.addElement(new Text(" mentioned here."));

 // Empty element for dynamic content
 Underline dynamic = new Underline();
 dynamic.setText("Dynamic content");
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • U
  • invalid reference
    PhrasingContentElement
  • Constructor Details

    • Underline

      public Underline()
      Constructs an empty Underline element.

      Creates a new <u> element with no initial text content. Text can be added later using methods inherited from the parent classes.

    • Underline

      public Underline(String text)
      Constructs an Underline element with the specified text content.

      Creates a new <u> element containing the provided text, which will be rendered with underline decoration.

      Parameters:
      text - the text content to display with underline