Class TextMarker

  • All Implemented Interfaces:
    Marker

    public class TextMarker
    extends Object
    implements Marker
    A marker for text/HTML output.

    This class has few instances, which are accessible by means of final static fields.

    • Field Detail

      • TEXT_STANDOUT

        public static final TextMarker TEXT_STANDOUT
        A text marker showing the marked text in (ANSI) standout mode, with blocks surrounded by ".." and terminated by a newline.
      • TEXT_BOLDFACE

        public static final TextMarker TEXT_BOLDFACE
        A text marker showing the marked text in (ANSI) boldface, with blocks surrounded by "..." and terminated by a newline.
      • HTML_STRONG

        public static final TextMarker HTML_STRONG
        An HTML marker showing the marked text in a strong element, surrounded by hellipsis () and terminated by a newline.
      • startOfMark

        public final String startOfMark
        The starting marker for a piece of block to be emphasized.
      • endOfMark

        public final String endOfMark
        The ending marker for a piece of block to be emphasized.
      • startOfBlock

        public final String startOfBlock
        The stating marker for a block.
      • endOfBlock

        public final String endOfBlock
        The ending marker for a block.
      • startOfField

        public final String startOfField
        The starting marker for a series of blocks belonging to the same field.
      • endOfField

        public final String endOfField
        The ending marker for a series of blocks belonging to the same field.
    • Constructor Detail

      • TextMarker

        public TextMarker​(String startOfMark,
                          String endOfMark,
                          String startOfBlock,
                          String endOfBlock,
                          String startOfField,
                          String endOfField)
        Creates a new text marker.
        Parameters:
        startOfMark - the starting marker for a piece of block to be emphasized.
        endOfMark - the ending marker for a piece of block to be emphasized.
        startOfBlock - the stating marker for a block.
        endOfBlock - the ending marker for a block.
        startOfField - the starting marker for a series of blocks belonging to the same field.
        endOfField - the ending marker for a series of blocks belonging to the same field.
    • Method Detail

      • endOfBlock

        public final String endOfBlock()
        Description copied from interface: Marker
        Returns the ending delimiter of a block.
        Specified by:
        endOfBlock in interface Marker
        Returns:
        the ending delimiter of a block.
      • endOfField

        public final String endOfField()
        Description copied from interface: Marker
        Returns the ending delimiter of a field.
        Specified by:
        endOfField in interface Marker
        Returns:
        the ending delimiter of a field.
      • endOfMark

        public final String endOfMark()
        Description copied from interface: Marker
        Returns the ending delimiter of a marked part.
        Specified by:
        endOfMark in interface Marker
        Returns:
        the ending delimiter of a marked part.
      • startOfBlock

        public final String startOfBlock()
        Description copied from interface: Marker
        Returns the starting delimiter of a block.
        Specified by:
        startOfBlock in interface Marker
        Returns:
        the starting delimiter of a block.
      • startOfField

        public final String startOfField()
        Description copied from interface: Marker
        Returns the starting delimiter of a field.
        Specified by:
        startOfField in interface Marker
        Returns:
        the starting delimiter of a field.
      • startOfMark

        public final String startOfMark()
        Description copied from interface: Marker
        Returns the starting delimiter of a marked part.
        Specified by:
        startOfMark in interface Marker
        Returns:
        the starting delimiter of a marked part.