Package Torello.HTML

Class Debug


  • public class Debug
    extends java.lang.Object
    A fast way to print Web-Page Vector's to a String.

    Debugging code that is written to modify or delete nodes in HTML is usually easy, until you misstep a node with an "off-by-one" error, or honest-but-poorly-placed break/continue statement in a loop. These methods make printing the contents of a Vector or sublist quick and easy.

    This class has many 'toString()' methods for printing Vectorized-HTML

    Note that it is always easiest to use: Util.pageToString, or Util.rangeToString for printing any Vector<HTMLNode>.
    Sublte Reminder:
    The class Util already has a 'pageToString' and 'rangeToString' method-group, which should usually be sufficient for debugging. Sometimes, though, the extra information that is printed by the debug-print methods in this class will help identify when a TextNode in your vectorized-html does not actually contain the text that the web-page in your browser is rendering.

    IMPORTANT:
    After some amount of debate, it seems easier to leave off another "English Word / English Language" description of what each of the methods in this class shall print. Instead, I will display sample UNIX Terminal Output that is generated using identical input to each of these methods.

    If the text output is not enough to explain, precisely, (in your mind) what the actual data that you are looking at is - please, you may also scroll down to the methods section on this page, to view the "character-by-character" code-explanation of what these debug methods are actually printing, precisely.

    The node classes in this HTML package are extremely light - they do not store many internal fields at all. In fact, only class HTML.TagNode even contains specialized extra internal fields.

    View the Different HTML Print Styles:


    Sample Input HTML:

    public static final String html =
         "<!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->" +
         "<h2>Dorothy Parker</h2>\n" +
         "<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>\n" +
         "<p>Parker was a very important screenwriter in the 1930s and 40s.<strong>She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism</strong>, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.</p>\n" +
         "<h2>Vince Vaughn</h2>\n" +
         "<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>\n" +
         "<p>Vince Vaughn was torn down for reasons outside of his personal sphere.<strong>Vaughn&rsquo;s downfall came from his inability to vary his acting techniques</strong>. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.</p>\n" +
         "<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->" +
         "<h2>Jim Caviezel</h2>\n" +
         "<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>\n" +
         "<p>Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but<strong>the overdramatization and hyper-violent imagery was met with backlash from the community.</strong>Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.</p>\n";
    


    Print Style A
    Standard Text, No New-Lines Added, Data Class Names Printed

    [CommentNode:<!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->][TagNode:<h2>][TextNode:Dorothy Parker][TagNode:</h2>][TextNode:
    ][TagNode:<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>][TextNode:
    ][TagNode:<p>][TextNode:Parker was a very important screenwriter in the 1930s and 40s.][TagNode:<strong>][TextNode:She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][TagNode:</strong>][TextNode:, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][TagNode:</p>][TextNode:
    ][TagNode:<h2>][TextNode:Vince Vaughn][TagNode:</h2>][TextNode:
    ][TagNode:<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>][TextNode:
    ][TagNode:<p>][TextNode:Vince Vaughn was torn down for reasons outside of his personal sphere.][TagNode:<strong>][TextNode:Vaughn’s downfall came from his inability to vary his acting techniques][TagNode:</strong>][TextNode:. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][TagNode:</p>][TextNode:
    ][CommentNode:<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][TagNode:<h2>][TextNode:Jim Caviezel][TagNode:</h2>][TextNode:
    ][TagNode:<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>][TextNode:
    ][TagNode:<p>][TextNode:Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][TagNode:<strong>][TextNode:the overdramatization and hyper-violent imagery was met with backlash from the community.][TagNode:</strong>][TextNode:Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][TagNode:</p>][TextNode:
    ]
    


    Print Style B
    Standard Text, No New-Lines Added, Data Class Names, Node-String Length Printed

    [CommentNode, StrLen=97: <!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->][TagNode, StrLen=4: <h2>][TextNode, StrLen=14: Dorothy Parker][TagNode, StrLen=5: </h2>][TextNode, StrLen=1: 
    ][TagNode, StrLen=93: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>][TextNode, StrLen=1: 
    ][TagNode, StrLen=3: <p>][TextNode, StrLen=62: Parker was a very important screenwriter in the 1930s and 40s.][TagNode, StrLen=8: <strong>][TextNode, StrLen=102: She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][TagNode, StrLen=9: </strong>][TextNode, StrLen=159: , which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][TagNode, StrLen=4: </p>][TextNode, StrLen=1: 
    ][TagNode, StrLen=4: <h2>][TextNode, StrLen=12: Vince Vaughn][TagNode, StrLen=5: </h2>][TextNode, StrLen=1: 
    ][TagNode, StrLen=82: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>][TextNode, StrLen=1: 
    ][TagNode, StrLen=3: <p>][TextNode, StrLen=70: Vince Vaughn was torn down for reasons outside of his personal sphere.][TagNode, StrLen=8: <strong>][TextNode, StrLen=77: Vaughn’s downfall came from his inability to vary his acting techniques][TagNode, StrLen=9: </strong>][TextNode, StrLen=202: . Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][TagNode, StrLen=4: </p>][TextNode, StrLen=1: 
    ][CommentNode, StrLen=100: <!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][TagNode, StrLen=4: <h2>][TextNode, StrLen=12: Jim Caviezel][TagNode, StrLen=5: </h2>][TextNode, StrLen=1: 
    ][TagNode, StrLen=90: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>][TextNode, StrLen=1: 
    ][TagNode, StrLen=3: <p>][TextNode, StrLen=166: Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][TagNode, StrLen=8: <strong>][TextNode, StrLen=89: the overdramatization and hyper-violent imagery was met with backlash from the community.][TagNode, StrLen=9: </strong>][TextNode, StrLen=125: Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][TagNode, StrLen=4: </p>][TextNode, StrLen=1: 
    ]
    


    Print Style C
    Standard Text, No New-Lines, Class Names, Instances of TagNode Have More Info Printed

    [CommentNode: <!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->][TagNode, n.tok=h2, n.isClosing=false: <h2>][TextNode: Dorothy Parker][TagNode, n.tok=h2, n.isClosing=true: </h2>][TextNode: 
    ][TagNode, n.tok=img, n.isClosing=false: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>][TextNode: 
    ][TagNode, n.tok=p, n.isClosing=false: <p>][TextNode: Parker was a very important screenwriter in the 1930s and 40s.][TagNode, n.tok=strong, n.isClosing=false: <strong>][TextNode: She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][TagNode, n.tok=strong, n.isClosing=true: </strong>][TextNode: , which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][TagNode, n.tok=p, n.isClosing=true: </p>][TextNode: 
    ][TagNode, n.tok=h2, n.isClosing=false: <h2>][TextNode: Vince Vaughn][TagNode, n.tok=h2, n.isClosing=true: </h2>][TextNode: 
    ][TagNode, n.tok=img, n.isClosing=false: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>][TextNode: 
    ][TagNode, n.tok=p, n.isClosing=false: <p>][TextNode: Vince Vaughn was torn down for reasons outside of his personal sphere.][TagNode, n.tok=strong, n.isClosing=false: <strong>][TextNode: Vaughn’s downfall came from his inability to vary his acting techniques][TagNode, n.tok=strong, n.isClosing=true: </strong>][TextNode: . Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][TagNode, n.tok=p, n.isClosing=true: </p>][TextNode: 
    ][CommentNode: <!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][TagNode, n.tok=h2, n.isClosing=false: <h2>][TextNode: Jim Caviezel][TagNode, n.tok=h2, n.isClosing=true: </h2>][TextNode: 
    ][TagNode, n.tok=img, n.isClosing=false: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>][TextNode: 
    ][TagNode, n.tok=p, n.isClosing=false: <p>][TextNode: Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][TagNode, n.tok=strong, n.isClosing=false: <strong>][TextNode: the overdramatization and hyper-violent imagery was met with backlash from the community.][TagNode, n.tok=strong, n.isClosing=true: </strong>][TextNode: Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][TagNode, n.tok=p, n.isClosing=true: </p>][TextNode: 
    ]
    


    Print Style D
    Standard Text, No New-Lines, Class Names, TagNode's more information, String Lengths Printed

    [CommentNode, StrLen=97: <!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->][TagNode, StrLen=4, n.tok=h2, n.isClosing=false: <h2>][TextNode, StrLen=14: Dorothy Parker][TagNode, StrLen=5, n.tok=h2, n.isClosing=true: </h2>][TextNode, StrLen=1: 
    ][TagNode, StrLen=93, n.tok=img, n.isClosing=false: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>][TextNode, StrLen=1: 
    ][TagNode, StrLen=3, n.tok=p, n.isClosing=false: <p>][TextNode, StrLen=62: Parker was a very important screenwriter in the 1930s and 40s.][TagNode, StrLen=8, n.tok=strong, n.isClosing=false: <strong>][TextNode, StrLen=102: She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][TagNode, StrLen=9, n.tok=strong, n.isClosing=true: </strong>][TextNode, StrLen=159: , which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][TagNode, StrLen=4, n.tok=p, n.isClosing=true: </p>][TextNode, StrLen=1: 
    ][TagNode, StrLen=4, n.tok=h2, n.isClosing=false: <h2>][TextNode, StrLen=12: Vince Vaughn][TagNode, StrLen=5, n.tok=h2, n.isClosing=true: </h2>][TextNode, StrLen=1: 
    ][TagNode, StrLen=82, n.tok=img, n.isClosing=false: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>][TextNode, StrLen=1: 
    ][TagNode, StrLen=3, n.tok=p, n.isClosing=false: <p>][TextNode, StrLen=70: Vince Vaughn was torn down for reasons outside of his personal sphere.][TagNode, StrLen=8, n.tok=strong, n.isClosing=false: <strong>][TextNode, StrLen=77: Vaughn’s downfall came from his inability to vary his acting techniques][TagNode, StrLen=9, n.tok=strong, n.isClosing=true: </strong>][TextNode, StrLen=202: . Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][TagNode, StrLen=4, n.tok=p, n.isClosing=true: </p>][TextNode, StrLen=1: 
    ][CommentNode, StrLen=100: <!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][TagNode, StrLen=4, n.tok=h2, n.isClosing=false: <h2>][TextNode, StrLen=12: Jim Caviezel][TagNode, StrLen=5, n.tok=h2, n.isClosing=true: </h2>][TextNode, StrLen=1: 
    ][TagNode, StrLen=90, n.tok=img, n.isClosing=false: <img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>][TextNode, StrLen=1: 
    ][TagNode, StrLen=3, n.tok=p, n.isClosing=false: <p>][TextNode, StrLen=166: Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][TagNode, StrLen=8, n.tok=strong, n.isClosing=false: <strong>][TextNode, StrLen=89: the overdramatization and hyper-violent imagery was met with backlash from the community.][TagNode, StrLen=9, n.tok=strong, n.isClosing=true: </strong>][TextNode, StrLen=125: Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][TagNode, StrLen=4, n.tok=p, n.isClosing=true: </p>][TextNode, StrLen=1: 
    ]
    


    Print Style E
    Standard Text, New-Lines Added After each Node (longer-text), Class Names, TagNode information, String Lengths

    [CommentNode, StrLen=97]
    [<!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->]
    [TagNode, StrLen=4, n.tok=h2, n.isClosing=false]
    [<h2>]
    [TextNode, StrLen=14]
    [Dorothy Parker]
    [TagNode, StrLen=5, n.tok=h2, n.isClosing=true]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=93, n.tok=img, n.isClosing=false]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=3, n.tok=p, n.isClosing=false]
    [<p>]
    [TextNode, StrLen=62]
    [Parker was a very important screenwriter in the 1930s and 40s.]
    [TagNode, StrLen=8, n.tok=strong, n.isClosing=false]
    [<strong>]
    [TextNode, StrLen=102]
    [She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism]
    [TagNode, StrLen=9, n.tok=strong, n.isClosing=true]
    [</strong>]
    [TextNode, StrLen=159]
    [, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.]
    [TagNode, StrLen=4, n.tok=p, n.isClosing=true]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=4, n.tok=h2, n.isClosing=false]
    [<h2>]
    [TextNode, StrLen=12]
    [Vince Vaughn]
    [TagNode, StrLen=5, n.tok=h2, n.isClosing=true]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=82, n.tok=img, n.isClosing=false]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=3, n.tok=p, n.isClosing=false]
    [<p>]
    [TextNode, StrLen=70]
    [Vince Vaughn was torn down for reasons outside of his personal sphere.]
    [TagNode, StrLen=8, n.tok=strong, n.isClosing=false]
    [<strong>]
    [TextNode, StrLen=77]
    [Vaughn’s downfall came from his inability to vary his acting techniques]
    [TagNode, StrLen=9, n.tok=strong, n.isClosing=true]
    [</strong>]
    [TextNode, StrLen=202]
    [. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.]
    [TagNode, StrLen=4, n.tok=p, n.isClosing=true]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    [CommentNode, StrLen=100]
    [<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->]
    [TagNode, StrLen=4, n.tok=h2, n.isClosing=false]
    [<h2>]
    [TextNode, StrLen=12]
    [Jim Caviezel]
    [TagNode, StrLen=5, n.tok=h2, n.isClosing=true]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=90, n.tok=img, n.isClosing=false]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=3, n.tok=p, n.isClosing=false]
    [<p>]
    [TextNode, StrLen=166]
    [Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but]
    [TagNode, StrLen=8, n.tok=strong, n.isClosing=false]
    [<strong>]
    [TextNode, StrLen=89]
    [the overdramatization and hyper-violent imagery was met with backlash from the community.]
    [TagNode, StrLen=9, n.tok=strong, n.isClosing=true]
    [</strong>]
    [TextNode, StrLen=125]
    [Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.]
    [TagNode, StrLen=4, n.tok=p, n.isClosing=true]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    
    


    Print Style F
    Standard Text, New-Lines Added (longer text), Class Names, TagNode.toStringAV() invoked on All TagNode, String Lengths

    [CommentNode, StrLen=97]
    [<!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->]
    TagNode.str: [<h2>], TagNode.tok: [h2], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=14]
    [Dorothy Parker]
    [TagNode, StrLen=5]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>], TagNode.tok: [img], TagNode.isClosing: [false]
    CONTAINS a total of (2) attributes / inner-tag key-value pairs:
    (KEY, VALUE):	[width], [750]
    (KEY, VALUE):	[src], [https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<p>], TagNode.tok: [p], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=62]
    [Parker was a very important screenwriter in the 1930s and 40s.]
    TagNode.str: [<strong>], TagNode.tok: [strong], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=102]
    [She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism]
    [TagNode, StrLen=9]
    [</strong>]
    [TextNode, StrLen=159]
    [, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.]
    [TagNode, StrLen=4]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<h2>], TagNode.tok: [h2], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=12]
    [Vince Vaughn]
    [TagNode, StrLen=5]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>], TagNode.tok: [img], TagNode.isClosing: [false]
    CONTAINS a total of (2) attributes / inner-tag key-value pairs:
    (KEY, VALUE):	[width], [750]
    (KEY, VALUE):	[src], [https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<p>], TagNode.tok: [p], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=70]
    [Vince Vaughn was torn down for reasons outside of his personal sphere.]
    TagNode.str: [<strong>], TagNode.tok: [strong], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=77]
    [Vaughn’s downfall came from his inability to vary his acting techniques]
    [TagNode, StrLen=9]
    [</strong>]
    [TextNode, StrLen=202]
    [. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.]
    [TagNode, StrLen=4]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    [CommentNode, StrLen=100]
    [<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->]
    TagNode.str: [<h2>], TagNode.tok: [h2], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=12]
    [Jim Caviezel]
    [TagNode, StrLen=5]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>], TagNode.tok: [img], TagNode.isClosing: [false]
    CONTAINS a total of (2) attributes / inner-tag key-value pairs:
    (KEY, VALUE):	[width], [750]
    (KEY, VALUE):	[src], [https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg]
    [TextNode, StrLen=1]
    [
    ]
    TagNode.str: [<p>], TagNode.tok: [p], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=166]
    [Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but]
    TagNode.str: [<strong>], TagNode.tok: [strong], TagNode.isClosing: [false]
    CONTAINS a total of (0) attributes / inner-tag key-value pairs:
    [TextNode, StrLen=89]
    [the overdramatization and hyper-violent imagery was met with backlash from the community.]
    [TagNode, StrLen=9]
    [</strong>]
    [TextNode, StrLen=125]
    [Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.]
    [TagNode, StrLen=4]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    
    


    Print Style G
    Standard Text, New-Lines Added, Class Names, TagNode.toStringAV() invoked - Except with Zero-Attribute TagNode's, String Lengths Printed

    [CommentNode, StrLen=97: <!-- This Content was copied from a Random Internet Photo Bomb Site.  Practice Makes Perfect. -->][TagNode, StrLen=4: <h2>][TextNode, StrLen=14: Dorothy Parker][TagNode, StrLen=5: </h2>][TextNode, StrLen=1: 
    ]
    TagNode.str: [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>], TagNode.tok: [img], TagNode.isClosing: [false]
    CONTAINS a total of (2) attributes / inner-tag key-value pairs:
    (KEY, VALUE):	[width], [750]
    (KEY, VALUE):	[src], [https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg]
    [TextNode, StrLen=1: 
    ][TagNode, StrLen=3: <p>][TextNode, StrLen=62: Parker was a very important screenwriter in the 1930s and 40s.][TagNode, StrLen=8: <strong>][TextNode, StrLen=102: She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][TagNode, StrLen=9: </strong>][TextNode, StrLen=159: , which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][TagNode, StrLen=4: </p>][TextNode, StrLen=1: 
    ][TagNode, StrLen=4: <h2>][TextNode, StrLen=12: Vince Vaughn][TagNode, StrLen=5: </h2>][TextNode, StrLen=1: 
    ]
    TagNode.str: [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>], TagNode.tok: [img], TagNode.isClosing: [false]
    CONTAINS a total of (2) attributes / inner-tag key-value pairs:
    (KEY, VALUE):	[width], [750]
    (KEY, VALUE):	[src], [https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg]
    [TextNode, StrLen=1: 
    ][TagNode, StrLen=3: <p>][TextNode, StrLen=70: Vince Vaughn was torn down for reasons outside of his personal sphere.][TagNode, StrLen=8: <strong>][TextNode, StrLen=77: Vaughn’s downfall came from his inability to vary his acting techniques][TagNode, StrLen=9: </strong>][TextNode, StrLen=202: . Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][TagNode, StrLen=4: </p>][TextNode, StrLen=1: 
    ][CommentNode, StrLen=100: <!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][TagNode, StrLen=4: <h2>][TextNode, StrLen=12: Jim Caviezel][TagNode, StrLen=5: </h2>][TextNode, StrLen=1: 
    ]
    TagNode.str: [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>], TagNode.tok: [img], TagNode.isClosing: [false]
    CONTAINS a total of (2) attributes / inner-tag key-value pairs:
    (KEY, VALUE):	[width], [750]
    (KEY, VALUE):	[src], [https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg]
    [TextNode, StrLen=1: 
    ][TagNode, StrLen=3: <p>][TextNode, StrLen=166: Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][TagNode, StrLen=8: <strong>][TextNode, StrLen=89: the overdramatization and hyper-violent imagery was met with backlash from the community.][TagNode, StrLen=9: </strong>][TextNode, StrLen=125: Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][TagNode, StrLen=4: </p>][TextNode, StrLen=1: 
    ]
    


    Print Style H (with UNIX Color-Codes)
    UNIX Color-Coded Text, No New-Lines Added (shorter text), Class Names, TagNode Information Printed, String Lengths

    [CommentNode, StrLen=97: <!-- This Content was copied from a Random Internet Photo Bomb Site. Practice Makes Perfect. -->][TagNode, StrLen=4, n.tok=h2, n.isClosing=false][<h2>][TextNode, StrLen=14: Dorothy Parker][TagNode, StrLen=5, n.tok=h2, n.isClosing=true][</h2>][TextNode, StrLen=1:
    ][TagNode, StrLen=93, n.tok=img, n.isClosing=false][<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>][TextNode, StrLen=1:
    ][TagNode, StrLen=3, n.tok=p, n.isClosing=false][<p>][TextNode, StrLen=62: Parker was a very important screenwriter in the 1930s and 40s.][TagNode, StrLen=8, n.tok=strong, n.isClosing=false][<strong>][TextNode, StrLen=102: She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][TagNode, StrLen=9, n.tok=strong, n.isClosing=true][</strong>][TextNode, StrLen=159: , which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][TagNode, StrLen=4, n.tok=p, n.isClosing=true][</p>][TextNode, StrLen=1:
    ][TagNode, StrLen=4, n.tok=h2, n.isClosing=false][<h2>][TextNode, StrLen=12: Vince Vaughn][TagNode, StrLen=5, n.tok=h2, n.isClosing=true][</h2>][TextNode, StrLen=1:
    ][TagNode, StrLen=82, n.tok=img, n.isClosing=false][<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>][TextNode, StrLen=1:
    ][TagNode, StrLen=3, n.tok=p, n.isClosing=false][<p>][TextNode, StrLen=70: Vince Vaughn was torn down for reasons outside of his personal sphere.][TagNode, StrLen=8, n.tok=strong, n.isClosing=false][<strong>][TextNode, StrLen=77: Vaughn’s downfall came from his inability to vary his acting techniques][TagNode, StrLen=9, n.tok=strong, n.isClosing=true][</strong>][TextNode, StrLen=202: . Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][TagNode, StrLen=4, n.tok=p, n.isClosing=true][</p>][TextNode, StrLen=1:
    ][CommentNode, StrLen=100: <!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][TagNode, StrLen=4, n.tok=h2, n.isClosing=false][<h2>][TextNode, StrLen=12: Jim Caviezel][TagNode, StrLen=5, n.tok=h2, n.isClosing=true][</h2>][TextNode, StrLen=1:
    ][TagNode, StrLen=90, n.tok=img, n.isClosing=false][<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>][TextNode, StrLen=1:
    ][TagNode, StrLen=3, n.tok=p, n.isClosing=false][<p>][TextNode, StrLen=166: Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][TagNode, StrLen=8, n.tok=strong, n.isClosing=false][<strong>][TextNode, StrLen=89: the overdramatization and hyper-violent imagery was met with backlash from the community.][TagNode, StrLen=9, n.tok=strong, n.isClosing=true][</strong>][TextNode, StrLen=125: Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][TagNode, StrLen=4, n.tok=p, n.isClosing=true][</p>][TextNode, StrLen=1:
    ]


    Print Style I (with UNIX Color-Codes)
    UNIX Color-Coded Text, New-Lines Added (longer text), Class Names, TagNode Information Printed, String Lengths

    [CommentNode, StrLen=97]
    [<!-- This Content was copied from a Random Internet Photo Bomb Site. Practice Makes Perfect. -->]
    [TagNode, StrLen=4, n.tok=h2, n.isClosing=false]
    [<h2>]
    [TextNode, StrLen=14]
    [Dorothy Parker]
    [TagNode, StrLen=5, n.tok=h2, n.isClosing=true]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=93, n.tok=img, n.isClosing=false]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=3, n.tok=p, n.isClosing=false]
    [<p>]
    [TextNode, StrLen=62]
    [Parker was a very important screenwriter in the 1930s and 40s.]
    [TagNode, StrLen=8, n.tok=strong, n.isClosing=false]
    [<strong>]
    [TextNode, StrLen=102]
    [She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism]
    [TagNode, StrLen=9, n.tok=strong, n.isClosing=true]
    [</strong>]
    [TextNode, StrLen=159]
    [, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.]
    [TagNode, StrLen=4, n.tok=p, n.isClosing=true]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=4, n.tok=h2, n.isClosing=false]
    [<h2>]
    [TextNode, StrLen=12]
    [Vince Vaughn]
    [TagNode, StrLen=5, n.tok=h2, n.isClosing=true]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=82, n.tok=img, n.isClosing=false]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=3, n.tok=p, n.isClosing=false]
    [<p>]
    [TextNode, StrLen=70]
    [Vince Vaughn was torn down for reasons outside of his personal sphere.]
    [TagNode, StrLen=8, n.tok=strong, n.isClosing=false]
    [<strong>]
    [TextNode, StrLen=77]
    [Vaughn’s downfall came from his inability to vary his acting techniques]
    [TagNode, StrLen=9, n.tok=strong, n.isClosing=true]
    [</strong>]
    [TextNode, StrLen=202]
    [. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.]
    [TagNode, StrLen=4, n.tok=p, n.isClosing=true]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]
    [CommentNode, StrLen=100]
    [<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->]
    [TagNode, StrLen=4, n.tok=h2, n.isClosing=false]
    [<h2>]
    [TextNode, StrLen=12]
    [Jim Caviezel]
    [TagNode, StrLen=5, n.tok=h2, n.isClosing=true]
    [</h2>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=90, n.tok=img, n.isClosing=false]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>]
    [TextNode, StrLen=1]
    [
    ]
    [TagNode, StrLen=3, n.tok=p, n.isClosing=false]
    [<p>]
    [TextNode, StrLen=166]
    [Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but]
    [TagNode, StrLen=8, n.tok=strong, n.isClosing=false]
    [<strong>]
    [TextNode, StrLen=89]
    [the overdramatization and hyper-violent imagery was met with backlash from the community.]
    [TagNode, StrLen=9, n.tok=strong, n.isClosing=true]
    [</strong>]
    [TextNode, StrLen=125]
    [Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.]
    [TagNode, StrLen=4, n.tok=p, n.isClosing=true]
    [</p>]
    [TextNode, StrLen=1]
    [
    ]


    Print Style J (with UNIX Color-Codes)
    UNIX Color-Coded Text, No New-Lines Added (shorter text), No Class Names Nor Extra Information Printed, Just the 'node.str' Field Will Be Viewable. Colors Reflect Node/Class Type.

    [<!-- This Content was copied from a Random Internet Photo Bomb Site. Practice Makes Perfect. -->][<h2>][Dorothy Parker][</h2>][
    ][<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>][
    ][<p>][Parker was a very important screenwriter in the 1930s and 40s.][<strong>][She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism][</strong>][, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.][</p>][
    ][<h2>][Vince Vaughn][</h2>][
    ][<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>][
    ][<p>][Vince Vaughn was torn down for reasons outside of his personal sphere.][<strong>][Vaughn’s downfall came from his inability to vary his acting techniques][</strong>][. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.][</p>][
    ][<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->][<h2>][Jim Caviezel][</h2>][
    ][<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>][
    ][<p>][Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but][<strong>][the overdramatization and hyper-violent imagery was met with backlash from the community.][</strong>][Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.][</p>][
    ]


    Print Style K (with UNIX Color-Codes)
    UNIX Color-Coded Text, New-Lines Added (longer text), No Class Names Nor Extra Information Printed, Just the 'node.str' Field Will Be Viewable. Colors Reflect Node/Class Type.

    [<!-- This Content was copied from a Random Internet Photo Bomb Site. Practice Makes Perfect. -->]
    [<h2>]
    [Dorothy Parker]
    [</h2>]
    [
    ]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/parker-1024x784.jpg'>]
    [
    ]
    [<p>]
    [Parker was a very important screenwriter in the 1930s and 40s.]
    [<strong>]
    [She wrote some incredible screenplays for Alfred Hitchcock but was accused of having ties to Communism]
    [</strong>]
    [, which destroyed her career pretty much instantly. In 1949, Parker received a 1,000-word letter, acknowledging her blacklisting for reasons tied to suspicion.]
    [</p>]
    [
    ]
    [<h2>]
    [Vince Vaughn]
    [</h2>]
    [
    ]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/7-11.jpg'>]
    [
    ]
    [<p>]
    [Vince Vaughn was torn down for reasons outside of his personal sphere.]
    [<strong>]
    [Vaughn’s downfall came from his inability to vary his acting techniques]
    [</strong>]
    [. Vaughn played the same character in every movie that he was in, he was never quite able to dump his goofy persona, even when acting in dramas. This is evident by his terrible season on True Detective.]
    [</p>]
    [
    ]
    [<!-- Programmers Note: Jim Caviezel plays 'The Man in the Suit' in TV show 'Person of Interest'. -->]
    [<h2>]
    [Jim Caviezel]
    [</h2>]
    [
    ]
    [<img width='750' src='https://upbeatnews.com/wp-content/uploads/2019/08/8-9-1024x576.jpg'>]
    [
    ]
    [<p>]
    [Caviezel was best known for his role as Jesus in The Passion of the Christ, directed by Mel Gibson. The movie made a bunch of money and received critical acclaim, but]
    [<strong>]
    [the overdramatization and hyper-violent imagery was met with backlash from the community.]
    [</strong>]
    [Caviezel has had a few small roles since The Passion of the Christ, but he has yet to be offered a full role in a film since.]
    [</p>]
    [
    ]



    Stateless Class:
    This class neither contains any program-state, nor can it be instantiated. The @StaticFunctional Annotation may also be called 'The Spaghetti Report'. Static-Functional classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's @Stateless Annotation.

    • 1 Constructor(s), 1 declared private, zero-argument constructor
    • 17 Method(s), 17 declared static
    • 1 Field(s), 1 declared static, 0 declared final
    • Fields excused from final modifier (with explanation):
      Field 'lastWasNewLine' is not final. Reason: FLAG


    • Method Summary

       
      Print-Style Methods (Lambdas)
      Modifier and Type Method
      static void A​(HTMLNode n, StringBuffer sb)
      static void B​(HTMLNode n, StringBuffer sb)
      static void C​(HTMLNode n, StringBuffer sb)
      static void D​(HTMLNode n, StringBuffer sb)
      static void E​(HTMLNode n, StringBuffer sb)
      static void F​(HTMLNode n, StringBuffer sb)
      static void G​(HTMLNode n, StringBuffer sb)
      static void H​(HTMLNode n, StringBuffer sb)
      static void I​(HTMLNode n, StringBuffer sb)
      static void J​(HTMLNode n, StringBuffer sb)
      static void K​(HTMLNode n, StringBuffer sb)
       
      Print Methods
      Modifier and Type Method
      static String print​(Vector<? extends HTMLNode> page, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      static String print​(SubSection sec, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
       
      Print Methods, Range-Limited
      Modifier and Type Method
      static String print​(Vector<? extends HTMLNode> page, int sPos, int ePos, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      static String print​(Vector<? extends HTMLNode> page, DotPair dp, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
       
      Print Methods, Vector-Index Array Limited
      Modifier and Type Method
      static String print​(Vector<? extends HTMLNode> page, int[] posArr, int radix, String nodesHaveBeenSkippedString, boolean addColorCurlyBracesToRequestedNodes, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      static String print​(Vector<? extends HTMLNode> page, int[] posArr, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • print

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.String print​
                    (java.util.Vector<? extends HTMLNode> page,
                     int sPos,
                     int ePos,
                     java.util.function.BiConsumer<HTMLNode,​java.lang.StringBuffer> printerVersion)
        
        Converts HTML to a String - adding readable notes & messages. This will print every node in the vectorized-html between starting-index int sPos (inclusively) and ending-index int ePos, exclusively.
        Parameters:
        page - Any vectorized-html page or sub-page.
        sPos - The printing of nodes will begin at position 'sPos' - inclusively.
        ePos - The node at element-position will not be printed (exclusive), and the one previous shall print.
        printerVersion - The complicated-looking function-pointer comes from the package 'java.util.function.' The literal code to pass to this parameter would be: Debug::A, Debug::B ... Debug::K. The programmer may also create a print-function if so desired, and pass that using a function-pointer or a lambda-expression
        Returns:
        a pretty printed String of the nodes in this Vector.
        Throws:
        java.lang.IndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the size of the Vector
        • If 'ePos' is zero, or greater than the size of the Vector
        • If the value of 'sPos' is a larger integer than 'ePos'. If 'ePos' was negative, it is first reset to Vector.size(), before this check is done.
        See Also:
        LV
        Code:
        Exact Method Body:
         LV              l   = new LV(page, sPos, ePos);
         StringBuffer    sb  = new StringBuffer();
        
         for (int i=l.start; i < l.end; i++)
             printerVersion.accept(page.elementAt(i), sb);
        
         return sb.toString();
        
      • print

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.String print​
                    (java.util.Vector<? extends HTMLNode> page,
                     int[] posArr,
                     java.util.function.BiConsumer<HTMLNode,​java.lang.StringBuffer> printerVersion)
        
        Converts HTML to a String - adding readable notes & messages. This version shall only print nodes whose index "is pointed to" by the elements of the position-index array parameter int[] posArr.
        Parameters:
        page - Any vectorized-html page or sub-page.
        posArr - This is an array of index-pointers into the vectorized-html webpage parameter 'page.' These arrays are usually created by calls to the package NodeSearch using classes with the 'Find' Key-Word. Such classes return integer-arrays of pointers to nodes that matched a specific search criteria.
        printerVersion - The complicated-looking function-pointer comes from the package 'java.util.function.' The literal code to pass to this parameter would be: Debug::A, Debug::B ... Debug::K. The programmer may also create a print-function if so desired, and pass that using a function-pointer or a lambda-expression.
        Returns:
        a pretty printed String of the nodes in this Vector pointed-to by the elements of 'posArr'
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If any of the elements in 'posArr' contain index-pointers that are out of range of Vector parameter 'page', then java will, naturally, throw this exception.
        Code:
        Exact Method Body:
         StringBuffer sb  = new StringBuffer();
         for (int i : posArr) printerVersion.accept(page.elementAt(i), sb);
         return sb.toString();
        
      • print

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.String print​
                    (java.util.Vector<? extends HTMLNode> page,
                     int[] posArr,
                     int radix,
                     java.lang.String nodesHaveBeenSkippedString,
                     boolean addColorCurlyBracesToRequestedNodes,
                     java.util.function.BiConsumer<HTMLNode,​java.lang.StringBuffer> printerVersion)
        
        Converts HTML to a String - adding readable notes & messages. This version shall only print nodes whose index "is pointed to" by the elements of the position-index array parameter int[] posArr.

        Note about Usability:
        This version of print can be invaluable during debugging when trolling through pages of HTML is reduced to only the indexes that are indicated by an index-pointer array. The addition of a "radix" means that some nodes before and after the identified node can be looked at too.
        Parameters:
        page - Any vectorized-html page or sub-page.
        posArr - This is an array of index-pointers into the vectorized-html webpage parameter 'page'. These arrays are usually created by calls to the package NodeSearch using classes with the 'Find' Key-Word. Such classes return integer-arrays of pointers to nodes that matched a specific search criteria.
        radix - The number of nodes, in both the forward and reverse directions, to include in the output for a match.
        nodesHaveBeenSkippedString - This will be printed whenever the print-logic has skipped nodes in the list during printing. An example of a good String to use would just be Sting s = "***** Nodes Skipped *****\n";, but any choice will do - so long as it gives the appearance the during printing there are "blank spots" that skipped some of the content of the html.
        addColorCurlyBracesToRequestedNodes - If this is TRUE, and the class Shell.C has its color String evaluated, because the program is running on some acceptable version of UNIX, then a bright-green colored curly-brace set will surround each node that is explicitly a member of the index-pointer-array, parameter 'posArr'

        NOTE: If this is unclear, this method prints every node that is pointed-to by the 'posArr' parameter. In addition to these nodes, it will print 'radix' nodes before and 'radix' nodes after each of the elements pointed to by the 'posArr' parameter. When viewing the output, if it is important to know which nodes are explicitly in the 'request-list' then adding bright-green curly braces to those output nodes will differentiate them from other nodes that are being printed because of the radix parameter.
        printerVersion - The complicated-looking function-pointer comes from the package 'java.util.function.' The literal code to pass to this parameter would be: Debug::A, Debug::B ... Debug::K. The programmer may also create a print-function if so desired, and pass that using a function-pointer or a lambda-expression
        Returns:
        a pretty printed String of the nodes in this Vector pointed-to by the elements of 'posArr', surrounded by 'radix' number of nodes in either direction.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If any of the elements in posArr contain index-pointers that are out of range of Vector-parameter 'page', then java will, naturally, throw this exception
        See Also:
        C
        Code:
        Exact Method Body:
         StringBuffer sb = new StringBuffer();
        
         // Used internally to print-curly braces
         TreeSet<Integer> ts = null;
        
         // Initialize it if the curly-braces are requested
         if (addColorCurlyBracesToRequestedNodes)
         {
             ts = new TreeSet<>();
             for (int pos : posArr) ts.add(Integer.valueOf(pos));
         }
        
         int start   = 0;
         int end     = 0;
        
         for (int i : posArr)
         {
             // Start at precisely the current index-pointer MINUS the radix.
             // OR ... If the loop is about to "reprint" a node because the radix is larger than the
             //        space between two consecutive nodes - then start at the node just after the
             //        last node that was printed.
        
             start = Math.max(i - radix, end + 1);
            
             // A large radix might get the loop past the end of the vector, AVOID THAT.
             if (start > (page.size() - 1)) break;
        
             // If the next node to be printed is immediately after the previous node that was
             // printed IN THE UNDERLYING HTML, then no nodes have been skipped, so don't print the
             // "nodesHaveBeenSkippedString" ... otherwise print it!
        
             if (start > (end + 1)) sb.append(nodesHaveBeenSkippedString);
        
             // Make sure not to go past the last node in the string, or exception will throw.
             end = Math.min(i + radix, (page.size() - 1));
        
             // It is possible that 'start' is greater than 'end' (too much overlap), in which case
             // the outer loop will continue on to the next index-pointer.
             // NOTE: uses 'j <= end' NOT 'j < end' !!! (TRICKY)
        
             if (addColorCurlyBracesToRequestedNodes)
        
                 for (int j=start; j <= end; j++)
                 {
                     boolean addColorBrackets = ts.contains(Integer.valueOf(j));
        
                     if (addColorBrackets)
                         sb.append(BGREEN + "{" + RESET);
        
                     printerVersion.accept(page.elementAt(j), sb);
        
                     if (addColorBrackets)
                         sb.append(BGREEN + "}" + RESET);
                 }
        
             else
                 for (int j=start; j <= end; j++)
                     printerVersion.accept(page.elementAt(j), sb);
         }
        
         return sb.toString();
        
      • A

        🡅  🡇     🗕  🗗  🗖
        public static void A​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'A'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if (name.equals("")) name = "Anonymous Class";
        
         sb.append("[" + name + ":" + n.str + "]");
        
      • B

        🡅  🡇     🗕  🗗  🗖
        public static void B​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'B'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if (name.equals("")) name = "Anonymous Class";
        
         sb.append("[" + name + ", StrLen=" + n.str.length() + ": " + n.str + "]");
        
      • C

        🡅  🡇     🗕  🗗  🗖
        public static void C​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'C'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str, TagNode.tok, TagNode.isClosing
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if  (name.equals("")) name = "Anonymous Class";
        
         if (n.isTagNode())
        
             sb.append(
                 "[" + name + ", n.tok=" + ((TagNode) n).tok + ", " +
                 "n.isClosing=" + ((TagNode) n).isClosing + ": " + n.str + "]"
             );
        
         else
             sb.append("[" + name + ": " + n.str + "]");
        
      • D

        🡅  🡇     🗕  🗗  🗖
        public static void D​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'D'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str, TagNode.tok, TagNode.isClosing
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if  (name.equals("")) name = "Anonymous Class";
        
         if (n.isTagNode())
        
             sb.append(
                 "[" + name + ", StrLen=" + n.str.length() + ", n.tok=" + ((TagNode) n).tok + ", " +
                 "n.isClosing=" + ((TagNode) n).isClosing + ": " + n.str + "]"
             );
        
         else
             sb.append("[" + name + ", StrLen=" + n.str.length() + ": " + n.str + "]");
        
      • E

        🡅  🡇     🗕  🗗  🗖
        public static void E​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'E'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str, TagNode.tok, TagNode.isClosing
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if  (name.equals("")) name = "Anonymous Class";
        
         if (n.isTagNode())
        
             sb.append(
                 "[" + name + ", StrLen=" + n.str.length() + ", n.tok=" + ((TagNode) n).tok + ", " +
                 "n.isClosing=" + ((TagNode) n).isClosing + "]\n[" + n.str + "]\n"
             );
        
         else
             sb.append("[" + name + ", StrLen=" + n.str.length() + "]\n[" + n.str + "]\n");
        
      • F

        🡅  🡇     🗕  🗗  🗖
        public static void F​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'F'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str, TagNode.isClosing, TagNode.toStringAV()
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if (name.equals("")) name = "Anonymous Class";
        
         if (n.isTagNode() && (! ((TagNode) n).isClosing))
             sb.append(((TagNode) n).toStringAV());
        
         else
             sb.append("[" + name + ", StrLen=" + n.str.length() + "]\n[" + n.str + "]\n");
        
      • G

        🡅  🡇     🗕  🗗  🗖
        public static void G​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'G'

        Thread Safety Point:
        Print Style G is not Thread safe!.
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        HTMLNode.str, TagNode.tok, TagNode.isClosing, TagNode.toStringAV()
        Code:
        Exact Method Body:
         String name = n.getClass().getSimpleName();
        
         // Extremely Unlikely Programmer has extended HTMLNode, but just in case, to prevent
         // exception.
        
         if (name.equals("")) name = "Anonymous Class";
        
         TagNode tn = null;
        
         if (    n.isTagNode()
             &&  (! (tn = (TagNode) n).isClosing)
             &&  (tn.str.length() > (tn.tok.length() + 4))
         )
         {
             sb.append((lastWasNewLine ? "" : "\n") + ((TagNode) n).toStringAV());
             lastWasNewLine = true;
         }
        
         else
         {
             sb.append("[" + name + ", StrLen=" + n.str.length() + ": " + n.str + "]");
             lastWasNewLine = false;
         };