Package Torello.HTML

Class Debug


  • public class Debug
    extends java.lang.Object
    Debug Printer - Documentation.

    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.

    NOTE: The class Util already has a >'pageToString' and 'rangeToString' method-set, 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.

    SAMPLE 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 Terminal 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 Terminal 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 Terminal 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 Terminal 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>]
    [
    ]


    Static (Functional) API: The methods in this class are all (100%) defined with the Java Key-Word / Key-Concept 'static'. Furthermore, there is no way to obtain an instance of this class, because there are no public (nor private) constructors. Java's Spring-Boot, MVC feature is *not* utilized because it flies directly in the face of the light-weight data-classes philosophy. This has many advantages over the rather ornate Component Annotations (@Component, @Service, @AutoWired, etc... 'Java Beans') syntax:

    • The methods here use the key-word 'static' which means (by implication) that there is no internal-state. Without any 'internal state' there is no need for constructors in the first place! (This is often the complaint by MVC Programmers).
    • A 'Static' (Functional-Programming) API expects to use fewer data-classes, and light-weight data-classes, making it easier to understand and to program.
    • The Vectorized HTML data-model allows more user-control over HTML parse, search, update & scrape. Also, memory management, memory leakage, and the Java Garbage Collector ought to be intelligible through the 'reuse' of the standard JDK class Vector for storing HTML Web-Page data.

    The power that object-oriented programming extends to a user is (mostly) limited to data-representation. Thinking of "Services" as "Objects" (Spring-MVC, 'Java Beans') is somewhat 'over-applying' the Object Oriented Programming Model. Like most classes in the Java-HTML JAR Library, this class backtracks to a more C-Styled Functional Programming Model (no Objects) - by re-using (quite profusely) the key-word static with all of its methods, and by sticking to Java's well-understood class Vector

    Internal-State: A user may click on this class' source code (see link below) to view any and all internally defined fields class. A cursory inspection of the code would prove that this class has precisely zero internally defined global fields (Spaghetti). All variables used by the methods in this class are local fields only, and therefore this class ought to be though of as 'state-less'.



    • Method Summary

      All Methods Static Methods Concrete Methods 
      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)
      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)
      static String print​(Vector<? extends HTMLNode> page, int sPos, int ePos, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      static String print​(Vector<? extends HTMLNode> page, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      static String print​(Vector<? extends HTMLNode> page, DotPair dp, BiConsumer<HTMLNode,​StringBuffer> printerVersion)
      static String print​(SubSection sec, 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,
                     java.util.function.BiConsumer<HTMLNode,​java.lang.StringBuffer> printerVersion)
        
        Convenience Method. Invokes print(Vector, int, int, BiConsumer).

        Requests printing of entire 'page' (Vector).
        Code:
        Exact Method Body:
        1
         return print(page, 0, -1, printerVersion);
        
      • print

        public static java.lang.String print​
                    (SubSection sec,
                     java.util.function.BiConsumer<HTMLNode,​java.lang.StringBuffer> printerVersion)
        
        Convenience Method. Invokes print(Vector, int, int, BiConsumer).

        Requests printing of entire SubSection.
        Code:
        Exact Method Body:
        1
         return print(sec.html, 0, -1, printerVersion);
        
      • print

        public static java.lang.String print​
                    (java.util.Vector<? extends HTMLNode> page,
                     DotPair dp,
                     java.util.function.BiConsumer<HTMLNode,​java.lang.StringBuffer> printerVersion)
        
        Convenience Method. Invokes print(Vector, int, int, BiConsumer).

        Requests printing of 'page' sub-range defined by parameter 'dp'.
        Code:
        Exact Method Body:
        1
         return print(page, dp.start, dp.end + 1, printerVersion);
        
      • 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:
        1
        2
        3
        4
        5
        6
        7
         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:
        1
        2
        3
         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.

        USEFULNESS NOTE: 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:
        Shell.C
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54
        55
        56
         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(C.BGREEN + "{" + C.RESET);
        
                     printerVersion.accept(page.elementAt(j), sb);
        
                     if (addColorBrackets)
                         sb.append(C.BGREEN + "}" + C.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:
        1
        2
        3
        4
        5
        6
        7
         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:
        1
        2
        3
        4
        5
        6
        7
         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:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
         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:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
         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:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
         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:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
         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'

        NOTE: 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:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
         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;
         };
        
      • H

        public static void H​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'H'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        Shell.C, Shell.C.RESET, Shell.C.BRED, Shell.C.BCYAN, HTMLNode.str, TagNode.tok, TagNode.isClosing
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
         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=" + C.BCYAN + n.str.length() + C.RESET + ", " +
                 "n.tok=" + C.BCYAN + ((TagNode) n).tok + C.RESET +", " +
                 "n.isClosing=" + C.BCYAN + ((TagNode) n).isClosing + C.RESET + "]" +
                 "[" + C.BRED + n.str + C.RESET + "]"
             );
         else
             sb.append(
                 "[" + name + ", StrLen=" + C.BCYAN + n.str.length() + C.RESET + ": " +
                 C.BRED + n.str + C.RESET + "]"
             );
        
      • I

        public static void I​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'I'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        Shell.C, Shell.C.RESET, Shell.C.BRED, Shell.C.BCYAN, HTMLNode.str, TagNode.tok
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
         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=" + C.BCYAN + n.str.length() + C.RESET + ", " +
                 "n.tok=" + C.BCYAN + ((TagNode) n).tok + C.RESET + ", " +
                 "n.isClosing=" + C.BCYAN + ((TagNode) n).isClosing + C.RESET + "]\n" +
                 "[" + C.BRED + n.str + C.RESET + "]\n"
             );
         else
             sb.append(
                 "[" + name + ", StrLen=" + C.BCYAN + n.str.length() + C.RESET + "]\n" +
                 "[" + C.BRED + n.str + C.RESET + "]\n"
             );
        
      • J

        public static void J​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'J'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        Shell.C, Shell.C.RESET, Shell.C.BRED, Shell.C.BYELLOW, HTMLNode.str
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
         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("[" + C.BRED + n.str + C.RESET + "]");
         else if (n.isCommentNode())
             sb.append("[" + C.BYELLOW + n.str + C.RESET + "]");
         else
             sb.append("[" + n.str + "]");
        
      • K

        public static void K​(HTMLNode n,
                             java.lang.StringBuffer sb)
        Prints an HTML Element (TagNode, TextNode or CommentNode) using Print Style 'K'
        Parameters:
        n - An HTMLNode that will print to the StringBuffer
        sb - the StringBuffer that is receiving the print command.
        See Also:
        Shell.C, Shell.C.RESET, Shell.C.BRED, Shell.C.BYELLOW, HTMLNode.str
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
         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("[" + C.BRED + n.str + C.RESET + "]\n");
         else if (n.isCommentNode())
             sb.append("[" + C.BYELLOW + n.str + C.RESET + "]\n");
         else
             sb.append("[" + n.str + "]\n");