Interface TextComparitor

  • All Superinterfaces:
    java.util.function.BiPredicate<java.lang.String,​java.lang.String[]>, java.io.Serializable
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TextComparitor
    extends java.util.function.BiPredicate<java.lang.String,​java.lang.String[]>, java.io.Serializable
    TextComparitor - Documentation.

    The primary use of the class TextComparitor is to provide an easy, seamless way for searching through the Vector<HTMLNode> object. This package contains numerous different variants of "search" all built into a consistently named Vector-search set of classes and methods in this package 'Torello.HTML.NodeSearch.*'.

    Sometimes one may wish to search an HTML page for either 'TagNode' elements, or 'TextNode' elements that contain one type of String. Other times a programmer might want to find HTML page elements that DO NOT contain a particular piece of text. Whatever the ultimate goal of the search, there is a version of TextComparitor and a method that will look for the right string-components. Looking for a particular ALT-text in an HTML <IMG SRC=... ALT=..> could be one use for this String-Parsing class, but there are plenty of examples of how to use the 'TextComparitor'

    Primarily, all the methods in this class are carbon-copies of the Torello.Java.StrCmpr class which allows for looking for all sorts of variants of sub-string inside a String. Generally, here, one would specify a certain Inner-Tag or 'Attribute' inside an HTML 'TagNode'. Once the name of the HTML Inner-Tag has been provided - often something common-place in HTML - like ID=... or possibly CLASS=..., but really anything that legally fit in an HTML TagNode may all be searched - but once the name of the Inner-Tag has been provided, using a TextComparitor (usually one, but multiple comparison-strings may be provided) ... Using a TextComparitor to find the right TagNodes will save quite a lot of time since this is often pretty buggy to write.

    This interface has many object references that have exactly the same function - actual duplicate references - but have names with different spellings and abbreviations. I have provided a list of each version of the spelling, and the goal of offering different ways to spell, type, or write a particular TextComparitor is to allow for a trade-off between readability and easy-of-use in software. If you would like to write "the short-version" of the class/method/function, then type the short version. If you want to type out the words "DOES_NOT_CONTAIN_CASE_INSENSITIVE" because it is easier to read than "CN_CI_NAND", then use the complete object-reference name in your code.

    • Name intended to hi-lite different boolean words, same/inter-changeable meaning - and for brevity.
    • Name shortened for brevity, but more difficult reading.
    • Name intended to hi-lite different boolean words, same/inter-changeable meaning.
    • Name changed for alternate-readability version.


    Example:
     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
    // Assume here that the "page" variable is defined as (downloaded into a java Vector, from a web-url):
    // Vector<HTMLNode> page = HTMLPage.getPageTokens(some_url, false); // contains a "vectorized" HTML Page
    // This will return a list of TagNode's that are HTML <A> (Anchor) elements where CLASS="MyWidgets"
    // NOTE: This will not return an Anchor-Element that has multiple CSS-Class Element, one of which happend
    //       to be "MyWidgets".  Rather, it will *only* return Anchor Elements whose CSS-class is only "MyWidgets"
    Vector<TagNode> anchors1 = InnerTagGet.all(page, "a", "class", TextComparitor.EQ_CI_TRM, "MyWidgets");
    
    // And this one (using the same "page" vector), will return any Anchor Elements that contain a CSS-Class "MyWidget"
    // even if there are multiple and other CSS-Classes listed in the CSS-Class String Attribute
    // NOTE: The TextComparitor.C is an abbreviation for 'TextComparitor.CONTAINS_CSS_CLASS_OR' (see fields listed, later)
    Vector<TagNode> anchors1 = InnerTagGet.all(page, "a", "class", TextComparitor.C, "MyWidgets");
    
    // Generates a list of any/all TagNode's which are indeed HTML <A> (Anchor) elements, but whose 'CLASS' attribute
    // value MAY NOT CONTAIN the CSS-Class "MyWidgets"
    Vector<TagNode> anchors2 = InnerTagGet.all(page, "a", "class", TextComparitor.C_NAND, "MyWidgets");
    
    // This will return a list of TagNode's all of which are HTML <DIV> elements, and whose 'CLASS' attribute value
    // contains at least one of the named CSS-Classes: "MyWidgets" or "MyPanels" or "UserInfo" 
    // This version uses the abbreviated 'C_AND' static-member of the TextComparitor Predicate.
    Vector<TagNode> divs = InnerTagGet.all(page, "div", "class", TextComparitor.C_AND, "MyWidgets", "MyPanels", "UserInfo");
    
    
    // This following three requests use different spellings, but whose are object-references to identical static-objects
    // provided in the TextComparitor class.  Therefore, of course, the result of all three lines-of-code here produce
    // identical results.  The only purpose to this is to allow for alternating between readability and easy-typing.
    
    Vector<TextNode> txtBlock1 = TextNodeGet.all(page, TextComparitor.CONTAINS_CASE_INSENSITIVE, "Bob", "Xavier", "Pablo");
    Vector<TextNode> txtBlock2 = TextNodeGet.all(page, TextComparitor.CONTAINS_CASE_INSENSITIVE_OR, "Bob", "Xavier", "Pablo");
    Vector<TextNode> txtBlock3 = TextNodeGet.all(page, TextComparitor.CN_CI,  "Bob", "Xavier", "Pablo");
    
    // *** TRY TO NOTE, that the purpose of having one object with "OR" and one without - is to hilite the point that
    // inclusive-or is the default behaviour of these comparison-searches.  (TextComparitor.CN_CI_OR would even work!)
    
    
    // This will return a list of TagNode's who images have a particular caption defined in the <IMG ALT='...'> attribute
    // Here, any image whose "ALT" field ENDS WITH either of these compare-strings: "Associated Press" or "Reuters"
    Vector<TagNode> images = InnerTagGet.all(page, "img", "alt", TextComparitor.EW_CI, "Associated Press", "Reuters");
    // SPECIFICALLY: get any HTML <IMG SRC=... ALT=...> where the attribute-value of ALT "ends with" the String
    // Associated Press, or Reuters.  EW means "Ends With" and CI means "Case Insensitive"
    



    • Field Detail

      • serialVersionUID

        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.

        Functional Interfaces are usually not thought of as Data Objects that need to be saved, stored and retrieved; however, having the ability to store intermediate results along with the lambda-functions that helped get those results can make debugging easier.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final long serialVersionUID = 1;
        
      • CONTAINS_CSS_CLASS_OR

        static final TextComparitor CONTAINS_CSS_CLASS_OR
        This will check that at least one of the named/provided "Compare-String's" are present, as tokens not substrings, in the CSS-Class-String of an HTML Element.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        StrTokCmpr.containsOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CSS_CLASS_OR = StrTokCmpr::containsOR;
        
      • CONTAINS_CSS_CLASS_AND

        static final TextComparitor CONTAINS_CSS_CLASS_AND
        This will check that all / every-one-of the named/provided "Compare-String's" are present, as tokens not substrings, in the CSS-Class-String of an HTML Element.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        StrTokCmpr.containsAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CSS_CLASS_AND = StrTokCmpr::containsAND;
        
      • CONTAINS_CSS_CLASS_NAND

        static final TextComparitor CONTAINS_CSS_CLASS_NAND
        This will check that none of the named/provided "Compare-String's" are present, as tokens not substrings, in the CSS-Class-String of an HTML Element.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        StrTokCmpr.containsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CSS_CLASS_NAND = StrTokCmpr::containsNAND;
        
      • CONTAINS_CSS_CLASS_XOR

        static final TextComparitor CONTAINS_CSS_CLASS_XOR
        This will check that exactly one of the named/provided "Compare-String's" are present, as tokens not substrings, in the CSS-Class-String of an HTML Element.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        StrTokCmpr.containsXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CSS_CLASS_XOR = StrTokCmpr::containsXOR;
        
      • C_OR

        static final TextComparitor C_OR
        This is used as an "abbreviation" to save typing (for convenience). It can reduce, however, readability.

        STANDARD-CSS: The standard way to look for HTML Element matches using a CSS-Selector is to use a boolean 'or', not a boolean 'and.'

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        CONTAINS_CSS_CLASS_OR
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor C_OR = CONTAINS_CSS_CLASS_OR;
        
      • C_AND

        static final TextComparitor C_AND
        This is used as an "abbreviation" to save typing (for convenience). It can reduce, however, readability. Since this is Java, not a CSS-Style-Sheet, this "selector" (java.util.function.BiPredicate) allows the programmer the flexibility to build an "AND" CSS-Class-Selector, rather than an "OR" CSS-Class-Selector.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        CONTAINS_CSS_CLASS_AND
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor C_AND = CONTAINS_CSS_CLASS_AND;
        
      • C_NAND

        static final TextComparitor C_NAND
        This is just used as an "abbreviation" to save typing (for convenience). It can reduce, however, readability. Since this is Java, not a CSS-Style-Sheet, this "selector" (java.util.function.BiPredicate) allows the programmer the flexibility to build a "NAND" CSS-Class-Selector, rather than an "OR" CSS-Class-Selector.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        CONTAINS_CSS_CLASS_NAND
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor C_NAND = CONTAINS_CSS_CLASS_NAND;
        
      • C_XOR

        static final TextComparitor C_XOR
        This is just used as an "abbreviation" to save typing (for convenience). It can reduce, however, readability. Since this is Java, not a CSS-Style-Sheet, this "selector" (java.util.function.BiPredicate) allows the programmer the flexibility to build a "XOR" CSS-Class-Selector, rather than an "OR" CSS-Class-Selector.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        CONTAINS_CSS_CLASS_XOR
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor C_XOR = CONTAINS_CSS_CLASS_XOR;
        
      • C

        static final TextComparitor C
        This is used as an EXTRA "abbreviation" to save typing (for convenience). It can reduce, however, readability.

        STANDARD-CSS: The standard way to look for HTML Element matches using a CSS-Selector is to use a boolean 'or', not a boolean 'and'.

        ALSO: CSS Classes are not case insensitive.

        NOTE: All static-member fields of class TextComparitor that pertain to CSS-Classes use (Functional-Interface) test-comparisons that employ Case Sensitive Matching, and also Token Matching (as opposed to Substring Matching). Using as an example a query for CSS CLASS=foo, and an HTML Element like: '<DIV CLASS=foobar>', using a Token Matching Algorithm would deny this HTML Divider as a Match, which is the correct result. Note that if a simply invocation of cssAtribute.contains("foo") would (erroneously) return this divider as a match-result.

        A 'token' can only match the CSS Attribute CLASS=String if its match position-index inside the String has both a left and a right (preceding and succeeding) character match with one of three possible values: white-space (matching '\s'), String-start (matching '^'), or String-terminus (matching '$')
        See Also:
        C_OR, CONTAINS_CSS_CLASS_OR
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor C = C_OR;
        
      • EQ

        static final TextComparitor EQ
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If precisely one of the compare-String's equal the attribute-value or TextNode, then and only then will this BiPredicate return TRUE.
        See Also:
        StrCmpr.equalsXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EQ = StrCmpr::equalsXOR;
        
      • NOT_EQ

        static final TextComparitor NOT_EQ
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE.
        See Also:
        StrCmpr.equalsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_EQ = StrCmpr::equalsNAND;
        
      • EQ_NAND

        static final TextComparitor EQ_NAND
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. This function-pointer is identical to the one named NOT_EQ.
        See Also:
        StrCmpr.equalsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EQ_NAND = StrCmpr::equalsNAND;
        
      • EQ_CASE_INSENSITIVE

        static final TextComparitor EQ_CASE_INSENSITIVE
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If precisely one of the compare-String's equal the attribute-value or TextNode, then and only then will this BiPredicate return TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments.
        See Also:
        StrCmpr.equalsXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EQ_CASE_INSENSITIVE = StrCmpr::equalsXOR_CI;
        
      • EQ_CI

        static final TextComparitor EQ_CI
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If precisely one of the compare-String's equal the attribute-value or TextNode, then and only then will this BiPredicate return TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identical TextComparitor EQ_CASE_INSENSITIVE.
        See Also:
        StrCmpr.equalsXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EQ_CI = StrCmpr::equalsXOR_CI;
        
      • NOT_EQ_CASE_INSENSITIVE

        static final TextComparitor NOT_EQ_CASE_INSENSITIVE
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments.
        See Also:
        StrCmpr.equalsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_EQ_CASE_INSENSITIVE = StrCmpr::equalsNAND_CI;
        
      • NOT_EQ_CI

        static final TextComparitor NOT_EQ_CI
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identical TextComparitor NOT_EQ_CASE_INSENSITIVE.
        See Also:
        StrCmpr.equalsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_EQ_CI = StrCmpr::equalsNAND_CI;
        
      • EQ_CI_NAND

        static final TextComparitor EQ_CI_NAND
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identical TextComparitor NOT_EQ_CASE_INSENSITIVE.
        See Also:
        StrCmpr.equalsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EQ_CI_NAND = StrCmpr::equalsNAND_CI;
        
      • EQ_TRM

        static final TextComparitor EQ_TRM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If precisely one of the compare-String's equal the attribute-value or TextNode, then and only then will this BiPredicate return TRUE. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EQ_TRM =
                (String s, String[] sArr) -> StrCmpr.equalsXOR(s.trim(), sArr);
        
      • NOT_EQ_TRM

        static final TextComparitor NOT_EQ_TRM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_EQ_TRM = 
                (String s, String[] sArr) -> StrCmpr.equalsNAND(s.trim(), sArr);
        
      • EQ_NAND_TRM

        static final TextComparitor EQ_NAND_TRM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. This function-pointer is identical to the one named NOT_EQ. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EQ_NAND_TRM = 
                (String s, String[] sArr) -> StrCmpr.equalsNAND(s.trim(), sArr);
        
      • EQ_CASE_INSENSITIVE_TRIM

        static final TextComparitor EQ_CASE_INSENSITIVE_TRIM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If precisely one of the compare-String's equal the attribute-value or TextNode, then and only then will this BiPredicate return TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EQ_CASE_INSENSITIVE_TRIM = 
                (String s, String[] sArr) -> StrCmpr.equalsXOR_CI(s.trim(), sArr);
        
      • EQ_CI_TRM

        static final TextComparitor EQ_CI_TRM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If precisely one of the compare-String's equal the attribute-value or TextNode, then and only then will this BiPredicate return TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identical TextComparitor EQ_CASE_INSENSITIVE_TRIM. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EQ_CI_TRM = 
                (String s, String[] sArr) -> StrCmpr.equalsXOR_CI(s.trim(), sArr);
        
      • NOT_EQ_CASE_INSENSITIVE_TRIM

        static final TextComparitor NOT_EQ_CASE_INSENSITIVE_TRIM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_EQ_CASE_INSENSITIVE_TRIM = 
                (String s, String[] sArr) -> StrCmpr.equalsNAND_CI(s.trim(), sArr);
        
      • NOT_EQ_CI_TRM

        static final TextComparitor NOT_EQ_CI_TRM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identical TextComparitor NOT_EQ_CASE_INSENSITIVE_TRIM. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_EQ_CI_TRM = 
                (String s, String[] sArr) -> StrCmpr.equalsNAND_CI(s.trim(), sArr);
        
      • EQ_CI_NAND_TRM

        static final TextComparitor EQ_CI_NAND_TRM
        Will compare an attribute-value String, or TextNode for equality against a list of possible String-match candidates. If and only if none of the candidates are equal, can this BiPredicate evaluate to TRUE. In this function-pointer, the comparison performed will ignore the case of the arguments. Before the equality-comparison is performed, the java.lang.String.trim() method will be invoked on the attribute-value or TextNode.
        See Also:
        StrCmpr.equalsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EQ_CI_NAND_TRM = 
                (String s, String[] sArr) -> StrCmpr.equalsNAND_CI(s.trim(), sArr);
        
      • CONTAINS

        static final TextComparitor CONTAINS
        Checks an attribute-value or TextNode to identify whether it contains at least one match out of a list compare-String's.
        See Also:
        StrCmpr.containsOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS = StrCmpr::containsOR;
        
      • CONTAINS_AND

        static final TextComparitor CONTAINS_AND
        Checks an attribute-value or TextNode to identify whether it contains a match for every string in the list compare-String's.
        See Also:
        StrCmpr.containsAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_AND = StrCmpr::containsAND;
        
      • CONTAINS_XOR

        static final TextComparitor CONTAINS_XOR
        Checks an attribute-value or TextNode to identify if it will match precisely one and only one String from a list of compare-String's.
        See Also:
        StrCmpr.containsXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_XOR = StrCmpr::containsXOR;
        
      • CONTAINS_NAND

        static final TextComparitor CONTAINS_NAND
        Checks an attribute-value or TextNode to ensure that it does not contain any matches with the list of compare-String's.
        See Also:
        StrCmpr.containsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_NAND = StrCmpr::containsNAND;
        
      • CONTAINS_OR

        static final TextComparitor CONTAINS_OR
        Checks an attribute-value or TextNode to identify whether it contains at least one match out of a list of compare-String's.
        See Also:
        StrCmpr.containsOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_OR = StrCmpr::containsOR;
        
      • CN

        static final TextComparitor CN
        Checks an attribute-value or TextNode to identify whether it contains at least one match out of a list compare-String's. This field instance has an abbreviated name (for convenience), but identical function-pointer to CONTAINS (and also CONTAINS_OR).
        See Also:
        StrCmpr.containsOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CN = StrCmpr::containsOR;
        
      • CN_OR

        static final TextComparitor CN_OR
        Checks an attribute-value or TextNode to identify whether it contains at least one match out of a list compare-String's. This field instance has an abbreviated name (for convenience), but identical function-pointer to CONTAINS_OR (and also CONTAINS).
        See Also:
        StrCmpr.containsOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CN_OR = StrCmpr::containsOR;
        
      • CN_AND

        static final TextComparitor CN_AND
        Checks an attribute-value or TextNode to ensure that it does not contain any matches with the list of compare-String's. This field instance has an abbreviated name (for convenience), but identical function-pointer to CONTAINS_AND.
        See Also:
        StrCmpr.containsAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CN_AND = StrCmpr::containsAND;
        
      • CN_XOR

        static final TextComparitor CN_XOR
        Checks an attribute-value or TextNode to identify if it will match precisely one and only one String from a list of compare-String's. This field instance has an abbreviated name (for convenience), but identical function-pointer to CONTAINS_XOR.
        See Also:
        StrCmpr.containsXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CN_XOR = StrCmpr::containsXOR;
        
      • CN_NAND

        static final TextComparitor CN_NAND
        Checks an attribute-value or TextNode to ensure that it does not contain any matches with the list of compare-String's. This field instance has an abbreviated name (for convenience), but identical function-pointer to CONTAINS_NAND.
        See Also:
        StrCmpr.containsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CN_NAND = StrCmpr::containsNAND;
        
      • NOT_CN

        static final TextComparitor NOT_CN
        Checks an attribute-value or TextNode to ensure that it does not contain any matches with the list of compare-String's. This field instance differs in name only with other pre-defined static fields in this class. It's function pointer is identical to: CN_NAND, CONTAINS_NAND and DOES_NOT_CONTAIN.
        See Also:
        StrCmpr.containsNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_CN = StrCmpr::containsNAND;
        
      • CONTAINS_CASE_INSENSITIVE

        static final TextComparitor CONTAINS_CASE_INSENSITIVE
        Similar to public static field CONTAINS, this function-pointer checks an attribute-value or TextNode to identify whether it contains at least one match out of a list compare-String's. The difference between this field and the aforementioned public static field is that this one ('CONTAINS_CASE_INSENSITIVE') ignores the case of the lettering when performing the String comparisons.
        See Also:
        StrCmpr.containsOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CASE_INSENSITIVE = StrCmpr::containsOR_CI;
        
      • CONTAINS_CASE_INSENSITIVE_AND

        static final TextComparitor CONTAINS_CASE_INSENSITIVE_AND
        Just like public static field CONTAINS_AND, this function-pointer checks an attribute-value or TextNode to identify whether it contains a match for every string in the list compare-String's. The difference between this field and the aforementioned public static field is that this one ('CONTAINS_CASE_INSENSITIVE_AND') ignores the case of the lettering when performing the String comparisons.
        See Also:
        StrCmpr.containsAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CASE_INSENSITIVE_AND = StrCmpr::containsAND_CI;
        
      • CONTAINS_CASE_INSENSITIVE_XOR

        static final TextComparitor CONTAINS_CASE_INSENSITIVE_XOR
        Similar to public static field CONTAINS_XOR, this function-pointer checks an attribute-value or TextNode to identify if it will match precisely one and only one String from a list of compare-String's. The difference between this field and the aforementioned public static field is that this one ('CONTAINS_CASE_INSENSITIVE_XOR') ignores the case of the lettering when performing the String comparisons.
        See Also:
        StrCmpr.containsXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CASE_INSENSITIVE_XOR = StrCmpr::containsXOR_CI;
        
      • CONTAINS_CASE_INSENSITIVE_NAND

        static final TextComparitor CONTAINS_CASE_INSENSITIVE_NAND
        Just like public static field CONTAINS_NAND, this function pointer checks an attribute-value or TextNode to ensure that it does not contain any matches with the list of compare-String's. The difference between this field and the aforementioned public static field is that this one ('CONTAINS_CASE_INSENSITIVE_NAND') ignores the case of the lettering when performing the String comparisons.
        See Also:
        StrCmpr.containsNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CASE_INSENSITIVE_NAND = StrCmpr::containsNAND_CI;
        
      • CONTAINS_CASE_INSENSITIVE_OR

        static final TextComparitor CONTAINS_CASE_INSENSITIVE_OR
        Similar to public static field CONTAINS_OR, this function-pointer checks an attribute-value or TextNode to identify whether it contains at least one match out of a list of compare-String's. The difference between this field and the aforementioned public static field is that this one ('CONTAINS_CASE_INSENSITIVE_OR') ignores the case of the lettering when performing the String comparisons.
        See Also:
        StrCmpr.containsOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor CONTAINS_CASE_INSENSITIVE_OR = StrCmpr::containsOR_CI;
        
      • STARTS_WITH

        static final TextComparitor STARTS_WITH
        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor STARTS_WITH = StrCmpr::startsWithXOR;
        
      • DOES_NOT_START_WITH

        static final TextComparitor DOES_NOT_START_WITH
        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor DOES_NOT_START_WITH = StrCmpr::startsWithNAND;
        
      • STARTS_WITH_CASE_INSENSITIVE

        static final TextComparitor STARTS_WITH_CASE_INSENSITIVE
        Nearly identical to STARTS_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor STARTS_WITH_CASE_INSENSITIVE = StrCmpr::startsWithXOR_CI;
        
      • DOES_NOT_START_WITH_CASE_INSENSITIVE

        static final TextComparitor DOES_NOT_START_WITH_CASE_INSENSITIVE
        Nearly identical to DOES_NOT_START_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor DOES_NOT_START_WITH_CASE_INSENSITIVE = 
                StrCmpr::startsWithNAND_CI;
        
      • SW

        static final TextComparitor SW
        A static, function-pointer, field with an abbreviated name identical to field STARTS_WITH.

        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor SW = StrCmpr::startsWithXOR;
        
      • NOT_SW

        static final TextComparitor NOT_SW
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_START_WITH. The three static fields: DOES_NOT_START_WITH NOT_SW and SW_NAND are all identical references to the exact same method StrCmpr.startsWithNAND(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_SW = StrCmpr::startsWithNAND;
        
      • SW_NAND

        static final TextComparitor SW_NAND
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_START_WITH. The three static fields: DOES_NOT_START_WITH, NOT_SW and SW_NAND are all identical references to the exact same method StrCmpr.startsWithNAND(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor SW_NAND = StrCmpr::startsWithNAND;
        
      • SW_CI

        static final TextComparitor SW_CI
        A static, function-pointer, field with an abbreviated name identical to field STARTS_WITH_CASE_INSENSITIVE.

        Nearly identical to STARTS_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor SW_CI = StrCmpr::startsWithXOR_CI;
        
      • NOT_SW_CI

        static final TextComparitor NOT_SW_CI
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_START_WITH_CASE_INSENSITIVE. The three static fields: DOES_NOT_START_WITH_CASE_INSENSITIVE, NOT_SW_CI and SW_CI_NAND are all identical references to the exact same method StrCmpr.startsWithNAND_CI(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Nearly identical to DOES_NOT_START_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_SW_CI = StrCmpr::startsWithNAND_CI;
        
      • SW_CI_NAND

        static final TextComparitor SW_CI_NAND
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_START_WITH_CASE_INSENSITIVE. The three static fields: DOES_NOT_START_WITH_CASE_INSENSITIVE, NOT_SW_CI and SW_CI_NAND are all identical references to the exact same method StrCmpr.startsWithNAND_CI(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Nearly identical to DOES_NOT_START_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the initial characters (the 'start' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.startsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor SW_CI_NAND = StrCmpr::startsWithNAND_CI;
        
      • STARTS_WITH_TRIM

        static final TextComparitor STARTS_WITH_TRIM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field STARTS_WITH.
        See Also:
        StrCmpr.startsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor STARTS_WITH_TRIM = 
                (String s, String[] sArr) -> StrCmpr.startsWithXOR(s.trim(), sArr);
        
      • DOES_NOT_START_WITH_TRIM

        static final TextComparitor DOES_NOT_START_WITH_TRIM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field DOES_NOT_START_WITH.
        See Also:
        StrCmpr.startsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor DOES_NOT_START_WITH_TRIM =
                (String s, String[] sArr) -> StrCmpr.startsWithNAND(s.trim(), sArr);
        
      • SW_TRM

        static final TextComparitor SW_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field SW.
        See Also:
        StrCmpr.startsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor SW_TRM =
                (String s, String[] sArr) -> StrCmpr.startsWithXOR(s.trim(), sArr);
        
      • NOT_SW_TRM

        static final TextComparitor NOT_SW_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field NOT_SW.
        See Also:
        StrCmpr.startsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_SW_TRM = 
                (String s, String[] sArr) -> StrCmpr.startsWithNAND(s.trim(), sArr);
        
      • SW_NAND_TRM

        static final TextComparitor SW_NAND_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field SW_NAND.
        See Also:
        StrCmpr.startsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor SW_NAND_TRM = 
                (String s, String[] sArr) -> StrCmpr.startsWithNAND(s.trim(), sArr);
        
      • SW_CI_TRM

        static final TextComparitor SW_CI_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field SW_CI.
        See Also:
        StrCmpr.startsWithXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor SW_CI_TRM = 
                (String s, String[] sArr) -> StrCmpr.startsWithXOR_CI(s.trim(), sArr);
        
      • NOT_SW_CI_TRM

        static final TextComparitor NOT_SW_CI_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field NOT_SW_CI.
        See Also:
        StrCmpr.startsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_SW_CI_TRM = 
                (String s, String[] sArr) -> StrCmpr.startsWithNAND_CI(s.trim(), sArr);
        
      • SW_CI_NAND_TRM

        static final TextComparitor SW_CI_NAND_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field SW_CI_NAND.
        See Also:
        SW_CI_NAND, StrCmpr.startsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor SW_CI_NAND_TRM = 
                (String s, String[] sArr) -> StrCmpr.startsWithNAND_CI(s.trim(), sArr);
        
      • ENDS_WITH

        static final TextComparitor ENDS_WITH
        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor ENDS_WITH = StrCmpr::endsWithXOR;
        
      • DOES_NOT_END_WITH

        static final TextComparitor DOES_NOT_END_WITH
        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor DOES_NOT_END_WITH = StrCmpr::endsWithNAND;
        
      • ENDS_WITH_CASE_INSENSITIVE

        static final TextComparitor ENDS_WITH_CASE_INSENSITIVE
        Nearly identical to ENDS_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor ENDS_WITH_CASE_INSENSITIVE = StrCmpr::endsWithXOR_CI;
        
      • DOES_NOT_END_WITH_CASE_INSENSITIVE

        static final TextComparitor DOES_NOT_END_WITH_CASE_INSENSITIVE
        Nearly identical to DOES_NOT_END_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor DOES_NOT_END_WITH_CASE_INSENSITIVE = 
                StrCmpr::endsWithNAND_CI;
        
      • EW

        static final TextComparitor EW
        A static, function-pointer, field with an abbreviated name identical to field ENDS_WITH.

        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EW = StrCmpr::endsWithXOR;
        
      • NOT_EW

        static final TextComparitor NOT_EW
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_END_WITH. The three static fields: DOES_NOT_END_WITH, NOT_EW and EW_NAND are all identical references to the exact same method StrCmpr.endsWithNAND(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_EW = StrCmpr::endsWithNAND;
        
      • EW_NAND

        static final TextComparitor EW_NAND
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_END_WITH. The three static fields: DOES_NOT_END_WITH, NOT_EW and EW_NAND are all identical references to the exact same method StrCmpr.endsWithNAND(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EW_NAND = StrCmpr::endsWithNAND;
        
      • EW_CI

        static final TextComparitor EW_CI
        A static, function-pointer, field with an abbreviated name identical to field ENDS_WITH_CASE_INSENSITIVE.

        Nearly identical to ENDS_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will match with precisely one of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EW_CI = StrCmpr::endsWithXOR_CI;
        
      • NOT_EW_CI

        static final TextComparitor NOT_EW_CI
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_END_WITH_CASE_INSENSITIVE. The three static fields: DOES_NOT_END_WITH_CASE_INSENSITIVE, NOT_EW_CI and EW_CI_NAND are all identical references to the exact same method StrCmpr.endsWithNAND_CI(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Nearly identical to DOES_NOT_END_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor NOT_EW_CI = StrCmpr::endsWithNAND_CI;
        
      • EW_CI_NAND

        static final TextComparitor EW_CI_NAND
        A static, function-pointer, field with an abbreviated name identical to field DOES_NOT_END_WITH_CASE_INSENSITIVE. The three static fields: DOES_NOT_END_WITH_CASE_INSENSITIVE, NOT_EW_CI and EW_CI_NAND are all identical references to the exact same method StrCmpr.endsWithNAND_CI(...); They are just abbreviated names to allow for trading-off 'code readability' and brevity.

        Nearly identical to DOES_NOT_END_WITH, but here the function-pointer points to a method that ignores case when performing the comparisons. This public static field checks an input 'source String' (usually an inner-tag value or a TextNode) to verify that the ending characters (the 'tail' of the source-String) will not match with any of the java var-args String... compare-String's list.
        See Also:
        StrCmpr.endsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        public static final TextComparitor EW_CI_NAND = StrCmpr::endsWithNAND_CI;
        
      • ENDS_WITH_TRIM

        static final TextComparitor ENDS_WITH_TRIM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field ENDS_WITH.
        See Also:
        ENDS_WITH, StrCmpr.endsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor ENDS_WITH_TRIM = 
                (String s, String[] sArr) -> StrCmpr.endsWithXOR(s.trim(), sArr);
        
      • EW_TRM

        static final TextComparitor EW_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field EW.
        See Also:
        EW, StrCmpr.endsWithXOR(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EW_TRM = 
                (String s, String[] sArr) -> StrCmpr.endsWithXOR(s.trim(), sArr);
        
      • NOT_EW_TRM

        static final TextComparitor NOT_EW_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field NOT_EW.
        See Also:
        NOT_EW, StrCmpr.endsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_EW_TRM = 
                (String s, String[] sArr) -> StrCmpr.endsWithNAND(s.trim(), sArr);
        
      • EW_NAND_TRM

        static final TextComparitor EW_NAND_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field EW_NAND.
        See Also:
        EW_NAND, StrCmpr.endsWithNAND(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EW_NAND_TRM = 
                (String s, String[] sArr) -> StrCmpr.endsWithNAND(s.trim(), sArr);
        
      • EW_CI_TRM

        static final TextComparitor EW_CI_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field EW_CI.
        See Also:
        EW_CI, StrCmpr.endsWithXOR_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EW_CI_TRM = 
                (String s, String[] sArr) -> StrCmpr.endsWithXOR_CI(s.trim(), sArr);
        
      • NOT_EW_CI_TRM

        static final TextComparitor NOT_EW_CI_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field NOT_EW_CI.
        See Also:
        NOT_EW_CI, StrCmpr.endsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor NOT_EW_CI_TRM = 
                (String s, String[] sArr) -> StrCmpr.endsWithNAND_CI(s.trim(), sArr);
        
      • EW_CI_NAND_TRM

        static final TextComparitor EW_CI_NAND_TRM
        Invokes java.lang.String.trim() on the first input-parameter; although the remainder of this BiPredicate<String, String[] is identical to public static field EW_CI_NAND.
        See Also:
        EW_CI_NAND, StrCmpr.endsWithNAND_CI(String, String[])
        Code:
        Exact Field Declaration Expression:
        1
        2
        public static final TextComparitor EW_CI_NAND_TRM =
                (String s, String[] sArr) -> StrCmpr.endsWithNAND_CI(s.trim(), sArr);
        
    • Method Detail

      • test

        boolean test​(java.lang.String str,
                     java.lang.String[] compareText)
        FUNCTIONAL-INTERFACE BOOLEAN METHOD: This is the method that fulfils this functional-interface 'test' method. This accept method must also be defined by the user. Often a user will provide multiple pieces of text to compare against the String inside the TagNode attribute or the TextNode. The purpose of this interface is to allow for all forms of boolean-evaluation to occur including: Inclusive-OR, Exclusive-OR, AND, NAND (multiple-not)
        Specified by:
        test in interface java.util.function.BiPredicate<java.lang.String,​java.lang.String[]>
        Parameters:
        str - This is usually a line of text from the public final String str field of the class TextNode, if the programmer is requesting a TextNode search. If the search being performed is on TagNode attribute values, then the value of parameter String htmlText will be any String-text within an HTML Element's attribute value.
        compareText - This is a list of different text-strings to be used with class StrCompr.
        Returns:
        After performing the single-input-parameter "version of" the accept(htmlText, compareText) method on as many of the elements of the String[] compareText input-array, this will return TRUE or FALSE dependent on the expected boolean-logic behavior of the comparison. This is simple, as the four primary boolean operations: AND, OR, NAND, XOR are provided as pre-defined methods here.

        NOTE: All boolean evaluations done are short-circuit evaluations. As soon as a function result-value is known, it will be returned.
        ALSO: Loops begin with the first element of the String[] compareText array, and stop with the last element.
      • getName

        static java.lang.String getName​(TextComparitor tc)
        Helper / Convenience Method. In almost all cases, this will return the actual field / variable name of an instance of TextComparitor. The lookup method uses reflection, and is therefore not the most efficient way to do this. In light of keeping a large Hashtable of all the names, Java Reflection is used. Certainly any instance of these variables found here will produce a good String.

        NOTE:There are hyperbolic cases where this method will fail. If the user request the name of a "Serialized Version" of a TextComparitor, then the instance-reference loaded from a Serialized Object File, and the instance reference stored inside this class would be different. If, indeed, there were two instances of 'TextComparitor.STARTS_WITH' then the serialized version of 'TextComparitor.STARTS_WITH' would not properly return the String 'STARTS_WITH'

        PRIMARILY: This method is used by one of the exception reporting mechanisms, and does not rely on serialized, saved, or user-created TextComparitor's, so retrieving the name will work just fine.

        AGAIN: This method is used internally for error-reporting.
        Parameters:
        tc - Any instance of this class, TextComparitor.
        Returns:
        If the reference provided is one of the TextComparitor's defined in this class, then the name of the field will be returned as a String. If this is a user-defined TextComparitor, then it's name will not be found, and 'null' shall be returned.

        Example:
        1
        2
        3
        4
         String name = TextComparitor.getName(TextComparitor.EQ);
         System.out.println(name);
         // Prints the String: "EQ"
         
        
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
        7
        8
         Field[] fArr = TextComparitor.class.getDeclaredFields();
        
         try
             { for (Field f : fArr) if (f.get(null) == tc) return f.getName(); }
         catch (IllegalAccessException e)
             { return null; }
        
         return null;