Package Torello.HTML

Class PageStats

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PageStats>

    public class PageStats
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<PageStats>, java.lang.Cloneable
    PageStats -Documentation.

    The original intention of this class was to have a simple way of "page-equality checking." Sometimes downloading from a URL will return an HTML page that has changed. This class does some common statistics/features calculations about the page - count the number of nodes (for instance), and count common node-occurrences like the presence of both opening and closing HTML tags (this is sometimes thought of as 'well-formed HTML').

    It will also do a complete java.lang.String hash-code on the entire page, so it is almost 100% likely that a PageStats instance is a unique-identifier of the actual HTML page. Also, there is some basic information available in the class which may (or may not) be of use to a programmer.

    Primarily: When this class is converted to a String - using: StringParse.objToStr(instance); - the java-string that is generated could be used as a "Unique Identifier" (similar to a Primary Key in a DataBase) to guarantee that two pages, when compared, are either identical or are different. This could avoid the lengthy process of checking whether each and every string in each and ever HTMLNode were exactly equal. Mostly, because one of the statistics collected is a hash-code that hashes the page as as if it were a single string - the likelihood that using the public boolean 'equals(Object o)' method that's included in the class PageStats makes the chance of making an 'equality mistake' extremely, extremely low.

    IMPORTANT: The number of features that are polled or 'counted' when building an instance of this class creates enough pieces of information, 'data', to suite more than just the original purposes of the class PageStats. As mentioned, this module was written to help detect "page-equality" when downloading pages from similar or identical URL's. Hopefully, it is obvious that the list of statistics available when creating an instance of this class might be useful for many general purpose uses - besides equality checking.

    Each of the individual fields in an instance of PageStats are all 'public' 'final' fields. This does also mean that if a vectorized-html web-page is modified, the constructor to this class needs to generate an entire new instance of the class.
    See Also:
    Serialized Form



    • Field Detail

      • serialVersionUID

        public static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final long serialVersionUID = 1;
        
      • hasAVclass

        public final short hasAVclass
        The number of HTML TagNode elements that have a 'class' attribute, when queried using TagNode.AV("class")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVclass;
        
      • hasAVstyle

        public final short hasAVstyle
        The number of HTML TagNode elements that have a 'style' attribute, when queried using TagNode.AV("style")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVstyle;
        
      • hasAVid

        public final short hasAVid
        The number of HTML TagNode elements that have an 'id' attribute, when queried using TagNode.AV("id")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVid;
        
      • hasAVtitle

        public final short hasAVtitle
        The number of HTML TagNode elements that have a 'title' attribute, when queried using TagNode.AV("title")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVtitle;
        
      • hasAVhref

        public final short hasAVhref
        The number of HTML TagNode elements that have an 'href' attribute, when queried using TagNode.AV("href")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVhref;
        
      • hasAVhreflang

        public final short hasAVhreflang
        The number of HTML TagNode elements that have a 'hreflang' attribute, when queried using TagNode.AV("hreflang")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVhreflang;
        
      • hasAVsrc

        public final short hasAVsrc
        The number of HTML TagNode elements that have a 'src' attribute, when queried using TagNode.AV("src")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVsrc;
        
      • hasAVsrcset

        public final short hasAVsrcset
        The number of HTML TagNode elements that have a 'srcset' attribute, when queried using TagNode.AV("srcset")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVsrcset;
        
      • hasAVsrclang

        public final short hasAVsrclang
        The number of HTML TagNode elements that have a 'srclang' attribute, when queried using TagNode.AV("srclang")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVsrclang;
        
      • hasAVsrcdoc

        public final short hasAVsrcdoc
        The number of HTML TagNode elements that have a 'srcdoc' attribute, when queried using TagNode.AV("srcdoc")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVsrcdoc;
        
      • hasAValt

        public final short hasAValt
        The number of HTML TagNode elements that have an 'alt' attribute, when queried using TagNode.AV("alt")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAValt;
        
      • hasAVtarget

        public final short hasAVtarget
        The number of HTML TagNode elements that have a 'target' attribute, when queried using TagNode.AV("target")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVtarget;
        
      • hasAVwidth

        public final short hasAVwidth
        The number of HTML TagNode elements that have a 'width' attribute, when queried using TagNode.AV("width")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVwidth;
        
      • hasAVheight

        public final short hasAVheight
        The number of HTML TagNode elements that have a 'height' attribute, when queried using TagNode.AV("height")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVheight;
        
      • hasAVsize

        public final short hasAVsize
        The number of HTML TagNode elements that have a 'size' attribute, when queried using TagNode.AV("size")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVsize;
        
      • hasAVsizes

        public final short hasAVsizes
        The number of HTML TagNode elements that have a 'sizes' attribute, when queried using TagNode.AV("sizes")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVsizes;
        
      • hasAVcols

        public final short hasAVcols
        The number of HTML TagNode elements that have a 'cols' attribute, when queried using TagNode.AV("cols")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVcols;
        
      • hasAVcolspan

        public final short hasAVcolspan
        The number of HTML TagNode elements that have a 'colspan' attribute, when queried using TagNode.AV("colspan")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVcolspan;
        
      • hasAVrows

        public final short hasAVrows
        The number of HTML TagNode elements that have a 'rows' attribute, when queried using TagNode.AV("rows")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVrows;
        
      • hasAVrowspan

        public final short hasAVrowspan
        The number of HTML TagNode elements that have a 'rowspan' attribute, when queried using TagNode.AV("rowspan")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVrowspan;
        
      • hasAVwrap

        public final short hasAVwrap
        The number of HTML TagNode elements that have a 'wrap' attribute, when queried using TagNode.AV("wrap")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVwrap;
        
      • hasAVvalue

        public final short hasAVvalue
        The number of HTML TagNode elements that have a 'value' attribute, when queried using TagNode.AV("value")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVvalue;
        
      • hasAVtype

        public final short hasAVtype
        The number of HTML TagNode elements that have a 'type' attribute, when queried using TagNode.AV("type")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVtype;
        
      • hasAVname

        public final short hasAVname
        The number of HTML TagNode elements that have a 'name' attribute, when queried using TagNode.AV("name")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVname;
        
      • hasAVmin

        public final short hasAVmin
        The number of HTML TagNode elements that have a 'min' attribute, when queried using TagNode.AV("min")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVmin;
        
      • hasAVmax

        public final short hasAVmax
        The number of HTML TagNode elements that have a 'max' attribute, when queried using TagNode.AV("max")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVmax;
        
      • hasAVminlength

        public final short hasAVminlength
        The number of HTML TagNode elements that have a 'minlength' attribute, when queried using TagNode.AV("minlength")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVminlength;
        
      • hasAVmaxlength

        public final short hasAVmaxlength
        The number of HTML TagNode elements that have a 'maxlength' attribute, when queried using TagNode.AV("maxlength")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVmaxlength;
        
      • hasAVaccept

        public final short hasAVaccept
        The number of HTML TagNode elements that have a 'accept' attribute, when queried using TagNode.AV("accept")
        Code:
        Exact Field Declaration Expression:
        1
        public final short hasAVaccept;
        
      • numNodes

        public final int numNodes
        This is identical to the value returned by: pageVector.size()
        Code:
        Exact Field Declaration Expression:
        1
        public final int numNodes;
        
      • numImages

        public final short numImages
        The total number of HTML <IMG ...> 'TagNode' elements found on the page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numImages;
        
      • numMeta

        public final short numMeta
        The total number of HTML <META ...> 'TagNode' elements found on the page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numMeta;
        
      • numLink

        public final short numLink
        The total number of HTML <LINK ...> 'TagNode' elements found on the page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numLink;
        
      • numInput

        public final short numInput
        The total number of HTML <INPUT ...> 'TagNode' elements found on the page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numInput;
        
      • numEmbed

        public final short numEmbed
        The total number of HTML <EMBED ...> 'TagNode' elements found on this page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numEmbed;
        
      • numHR

        public final short numHR
        The total number of HTML <HR> 'TagNode' elements found on the page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numHR;
        
      • numBR

        public final short numBR
        The total number of HTML <BR> 'TagNode' elements found on the page.

        NOTE: This is considered an HTML-5 'Singleton' element, and thusly should only have an "Opening-Tag Version" of the Element. If there are (accidentally) closing-versions of this tag, they will not be counted by class PageStats
        Code:
        Exact Field Declaration Expression:
        1
        public final short numBR;
        
      • numOpenTables

        public final short numOpenTables
        The total number of <TABLE>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenTables;
        
      • numClosedTables

        public final short numClosedTables
        The total number of </TABLE>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedTables;
        
      • numOpenAnchors

        public final short numOpenAnchors
        The total number of <A> (Anchor), TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenAnchors;
        
      • numClosedAnchors

        public final short numClosedAnchors
        The total number of </A>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedAnchors;
        
      • numOpenParagraphs

        public final short numOpenParagraphs
        The total number of <P> (Paragraph), TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenParagraphs;
        
      • numClosedParagraphs

        public final short numClosedParagraphs
        The total number of </P>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedParagraphs;
        
      • numOpenDivs

        public final short numOpenDivs
        The total number of <DIV> (Divider), TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenDivs;
        
      • numClosedDivs

        public final short numClosedDivs
        The total number of </DIV>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedDivs;
        
      • numOpenSpans

        public final short numOpenSpans
        The total number of <SPAN>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenSpans;
        
      • numClosedSpans

        public final short numClosedSpans
        The total number of </SPAN>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedSpans;
        
      • numOpenScripts

        public final short numOpenScripts
        The total number of <SCRIPT>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenScripts;
        
      • numClosedScripts

        public final short numClosedScripts
        The total number of </SCRIPT>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedScripts;
        
      • numOpenStyles

        public final short numOpenStyles
        The total number of <STYLE>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenStyles;
        
      • numClosedStyles

        public final short numClosedStyles
        The total number of </STYLE>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedStyles;
        
      • numOpenFrames

        public final short numOpenFrames
        The total number of <FRAME>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenFrames;
        
      • numClosedFrames

        public final short numClosedFrames
        The total number of </FRAME>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedFrames;
        
      • numOpenIFrames

        public final short numOpenIFrames
        The total number of <IFRAME>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenIFrames;
        
      • numClosedIFrames

        public final short numClosedIFrames
        The total number of </IFRAME>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedIFrames;
        
      • numOpenForms

        public final short numOpenForms
        The total number of <FORM>, TC.OpeningTags, TagNode elements found on the page. Any element-internal attributes / inner-tags actually found inside the HTML element will just be ignored for the purposes of this count.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numOpenForms;
        
      • numClosedForms

        public final short numClosedForms
        The total number of </FORM>, TC.ClosingTags, TagNode elements found on the page.
        Code:
        Exact Field Declaration Expression:
        1
        public final short numClosedForms;
        
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Java's public boolean equals(Object o) requirements.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - This may be any Java Object, but only ones of 'this' type whose internal-values are identical will cause this method to return TRUE.
        Returns:
        TRUE if 'this' instance of PageStats is identical to parameter 'o'.
        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
        57
        58
        59
        60
        61
        62
        63
        64
        65
        66
        67
        68
        69
        70
        71
        72
        73
        74
        75
        76
        77
        78
        79
        80
        81
        82
        83
         if (! (o instanceof PageStats)) return false;
        
         PageStats otherPageStats = (PageStats) o;
        
         return
             (this.strLength             == otherPageStats.strLength)            &&
             (this.hash                  == otherPageStats.hash)                 &&
             (this.numNodes              == otherPageStats.numNodes)             &&
             (this.numTagNodes           == otherPageStats.numTagNodes)          &&
             (this.numTextNodes          == otherPageStats.numTextNodes)         &&
             (this.numCommentNodes       == otherPageStats.numCommentNodes)      &&
             (this.numNewLines           == otherPageStats.numNewLines)          &&
        
        
             (this.hasAVclass            == otherPageStats.hasAVclass)           &&
             (this.hasAVstyle            == otherPageStats.hasAVstyle)           &&
             (this.hasAVid               == otherPageStats.hasAVid)              &&
             (this.hasAVtitle            == otherPageStats.hasAVtitle)           &&
             (this.hasAVhref             == otherPageStats.hasAVhref)            &&
             (this.hasAVhreflang         == otherPageStats.hasAVhreflang)        &&
             (this.hasAVsrc              == otherPageStats.hasAVsrc)             &&
             (this.hasAVsrcset           == otherPageStats.hasAVsrcset)          &&
             (this.hasAVsrclang          == otherPageStats.hasAVsrclang)         &&
             (this.hasAVsrcdoc           == otherPageStats.hasAVsrcdoc)          &&
             (this.hasAValt              == otherPageStats.hasAValt)             &&
             (this.hasAVtarget           == otherPageStats.hasAVtarget)          &&
             (this.hasAVwidth            == otherPageStats.hasAVwidth)           &&
             (this.hasAVheight           == otherPageStats.hasAVheight)          &&
             (this.hasAVsize             == otherPageStats.hasAVsize)            &&
             (this.hasAVsizes            == otherPageStats.hasAVsizes)           &&
             (this.hasAVcols             == otherPageStats.hasAVcols)            &&
             (this.hasAVcolspan          == otherPageStats.hasAVcolspan)         &&
             (this.hasAVrows             == otherPageStats.hasAVrows)            &&
             (this.hasAVrowspan          == otherPageStats.hasAVrowspan)         &&
             (this.hasAVwrap             == otherPageStats.hasAVwrap)            &&
             (this.hasAVvalue            == otherPageStats.hasAVvalue)           &&
             (this.hasAVtype             == otherPageStats.hasAVtype)            &&
             (this.hasAVname             == otherPageStats.hasAVname)            &&
             (this.hasAVmin              == otherPageStats.hasAVmin)             &&
             (this.hasAVmax              == otherPageStats.hasAVmax)             &&
             (this.hasAVminlength        == otherPageStats.hasAVminlength)       &&
             (this.hasAVmaxlength        == otherPageStats.hasAVmaxlength)       &&
             (this.hasAVaccept           == otherPageStats.hasAVaccept)          &&
        
        
             (this.numImages             == otherPageStats.numImages)            &&
             (this.numMeta               == otherPageStats.numMeta)              &&
             (this.numLink               == otherPageStats.numLink)              &&
             (this.numInput              == otherPageStats.numInput)             &&
             (this.numEmbed              == otherPageStats.numEmbed)             &&
             (this.numHR                 == otherPageStats.numHR)                &&
             (this.numBR                 == otherPageStats.numBR)                &&
        
        
             (this.numOpenTables         == otherPageStats.numOpenTables)        &&
             (this.numClosedTables       == otherPageStats.numClosedTables)      &&
        
             (this.numOpenAnchors        == otherPageStats.numOpenAnchors)       &&
             (this.numClosedAnchors      == otherPageStats.numClosedAnchors)     &&
        
             (this.numOpenParagraphs     == otherPageStats.numOpenParagraphs)    &&
             (this.numClosedParagraphs   == otherPageStats.numClosedParagraphs)  &&
        
             (this.numOpenDivs           == otherPageStats.numOpenDivs)          &&
             (this.numClosedDivs         == otherPageStats.numClosedDivs)        &&
        
             (this.numOpenSpans          == otherPageStats.numOpenSpans)         &&
             (this.numClosedSpans        == otherPageStats.numClosedSpans)       &&
        
             (this.numOpenScripts        == otherPageStats.numOpenScripts)       &&
             (this.numClosedScripts      == otherPageStats.numClosedScripts)     &&
        
             (this.numOpenStyles         == otherPageStats.numOpenStyles)        &&
             (this.numClosedStyles       == otherPageStats.numClosedStyles)      &&
        
             (this.numOpenFrames         == otherPageStats.numOpenFrames)        &&
             (this.numClosedFrames       == otherPageStats.numClosedFrames)      &&
        
             (this.numOpenIFrames        == otherPageStats.numOpenIFrames)       &&
             (this.numClosedIFrames      == otherPageStats.numClosedIFrames)     &&
        
             (this.numOpenForms          == otherPageStats.numOpenForms)         &&
             (this.numClosedForms        == otherPageStats.numClosedForms);
        
      • hashCode

        public int hashCode()
        Java's hash-code requirement. Notice that this method is not static, and provides the hashCode that was computed for the vectorized-webpage when this instance of PageStats was created. Perhaps the subtlety is noticeable - there is also a public static version of method int hashCode(); Both of them will return the same number, but only one of them actually computes a hash-code (the static-method). This non-static merely retrieves the hash that was created when this instance was built by the constructor.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash-code that may be used when storing this node in a java sorted-collection.
        Code:
        Exact Method Body:
        1
         return this.hash;
        
      • compareTo

        public int compareTo​(PageStats other)
        Java's interface Comparable<T> requirements. This does a very simple comparison using the underlying field final String str that all HTMLNode's contain.
        Specified by:
        compareTo in interface java.lang.Comparable<PageStats>
        Parameters:
        other - Any other PageStats to be compared to 'this' PageStats
        Returns:
        An integer that fulfills Java's interface Comparable<T> public boolean compareTo(T t) method requirements.
        Code:
        Exact Method Body:
        1
        2
        3
         int compare1 = this.numNodes - other.numNodes;
         if (compare1 != 0) return compare1;
         return this.strLength - other.strLength;
        
      • toB64String

        public java.lang.String toB64String()
        This converts a PageStats object to a simple-string (Base64 Encoded) object that may be passed and transmitted as a String.
        Returns:
        Zipped, Serialized, Base-64 Encoded String version of this object.
        See Also:
        StringParse.objToB64Str(Object)
        Code:
        Exact Method Body:
        1
         try { return StringParse.objToB64Str(this); } catch (Exception e) { return null; }
        
      • fromB64String

        public static PageStats fromB64String​(java.lang.String minimized)
        Convets a Base65 Encoded String into an instance of PageStats
        Parameters:
        minimized - A previously minimized, compressed, Serialized version of this object (PageStats).
        Returns:
        An instance of this class.
        See Also:
        StringParse.b64StrToObj(String)
        Code:
        Exact Method Body:
        1
         try { return (PageStats) StringParse.b64StrToObj(minimized); } catch (Exception e) { return null; }
        
      • clone

        public PageStats clone()
        Generates a carbon copy of passed reference instance 'PageStats'
        Overrides:
        clone in class java.lang.Object
        Returns:
        Returns a 'clone' of this vector. Utilizes 'this' class, protected constructor.
        Code:
        Exact Method Body:
        1
         return new PageStats(this);
        
      • toString

        public java.lang.String toString()
        Generates a java string representation of 'this' instance of class PageStats
        Overrides:
        toString in class java.lang.Object
        Returns:
        a java string of all the details encapsulated by a PageStats object reference.
        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
        57
        58
        59
        60
        61
        62
        63
        64
        65
        66
        67
        68
        69
        70
        71
        72
        73
        74
        75
        76
        77
        78
        79
        80
        81
        82
         return
             "strLength            = " + strLength               + '\n' +
             "hash                 = " + hash                    + '\n' +
             "numNodes             = " + numNodes                + '\n' +
             "numTagNodes          = " + numTagNodes             + '\n' +
             "numTextNodes         = " + numTextNodes            + '\n' +
             "numCommentNodes      = " + numCommentNodes         + '\n' +
             "numNewLines          = " + numNewLines             + '\n' +
        
             "\n" +
        
             "hasAVclass           = " + hasAVclass              + "\n" + 
             "hasAVstyle           = " + hasAVstyle              + "\n" + 
             "hasAVid              = " + hasAVid                 + "\n" + 
             "hasAVtitle           = " + hasAVtitle              + "\n" + 
             "hasAVhref            = " + hasAVhref               + "\n" + 
             "hasAVhreflang        = " + hasAVhreflang           + "\n" + 
             "hasAVsrc             = " + hasAVsrc                + "\n" + 
             "hasAVsrcset          = " + hasAVsrcset             + "\n" + 
             "hasAVsrclang         = " + hasAVsrclang            + "\n" + 
             "hasAVsrcdoc          = " + hasAVsrcdoc             + "\n" + 
             "hasAValt             = " + hasAValt                + "\n" + 
             "hasAVtarget          = " + hasAVtarget             + "\n" + 
             "hasAVwidth           = " + hasAVwidth              + "\n" + 
             "hasAVheight          = " + hasAVheight             + "\n" + 
             "hasAVsize            = " + hasAVsize               + "\n" + 
             "hasAVsizes           = " + hasAVsizes              + "\n" + 
             "hasAVcols            = " + hasAVcols               + "\n" + 
             "hasAVcolspan         = " + hasAVcolspan            + "\n" + 
             "hasAVrows            = " + hasAVrows               + "\n" + 
             "hasAVrowspan         = " + hasAVrowspan            + "\n" + 
             "hasAVwrap            = " + hasAVwrap               + "\n" + 
             "hasAVvalue           = " + hasAVvalue              + "\n" + 
             "hasAVtype            = " + hasAVtype               + "\n" + 
             "hasAVname            = " + hasAVname               + "\n" + 
             "hasAVmin             = " + hasAVmin                + "\n" + 
             "hasAVmax             = " + hasAVmax                + "\n" + 
             "hasAVminlength       = " + hasAVminlength          + "\n" + 
             "hasAVmaxlength       = " + hasAVmaxlength          + "\n" + 
             "hasAVaccept          = " + hasAVaccept             + "\n" + 
        
             "\n" +
        
             "numImages            = " + numImages               + '\n' +
             "numMeta              = " + numMeta                 + '\n' +
             "numLink              = " + numLink                 + '\n' +
             "numInput             = " + numInput                + '\n' +
             "numEmbed             = " + numEmbed                + '\n' +
             "numHR                = " + numHR                   + '\n' +
             "numBR                = " + numBR                   + '\n' +
        
             "\n" +
        
             "numOpenTables        = " + numOpenTables           + '\n' +
             "numClosedTables      = " + numClosedTables         + '\n' +
        
             "numOpenAnchors       = " + numOpenAnchors          + '\n' +
             "numClosedAnchors     = " + numClosedAnchors        + '\n' +
        
             "numOpenParagraphs    = " + numOpenParagraphs       + '\n' +
             "numClosedParagraphs  = " + numClosedParagraphs     + '\n' +
        
             "numOpenDivs          = " + numOpenDivs             + '\n' +
             "numClosedDivs        = " + numClosedDivs           + '\n' +
        
             "numOpenSpans         = " + numOpenSpans            + '\n' +
             "numClosedSpans       = " + numClosedSpans          + '\n' +
        
             "numOpenScripts       = " + numOpenScripts          + '\n' +
             "numClosedScripts     = " + numClosedScripts        + '\n' +
        
             "numOpenStyles        = " + numOpenStyles           + '\n' +
             "numClosedStyles      = " + numClosedStyles         + '\n' +
        
             "numOpenFrames        = " + numOpenFrames           + '\n' +
             "numClosedFrames      = " + numClosedFrames         + '\n' +
        
             "numOpenIFrames       = " + numOpenIFrames          + '\n' +
             "numClosedIFrames     = " + numClosedIFrames        + '\n' +
        
             "numOpenForms         = " + numOpenForms            + '\n' +
             "numClosedForms       = " + numClosedForms          + '\n';