Package Torello.HTML.NodeSearch
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
A functional-interface / lambda-target that has many pre-instantiated instances that essentially serves a simplified wrappers for the manyString
search and comparison utilities provided inTorello.Java
.
The primary use of theclass TextComparitor
is to provide an easy, seamless way for searching through aVector<HTMLNode>
object. This package contains numerous different variants of "search" all built into a consistently namedVector
-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 a 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 ofTextComparitor
and a method that will look for the rightString
-components. Primarily, the methods in this class are carbon-copies (function-pointers) of thestatic
-methods inside classes StrCmpr and StrTokCmpr. This allows many variants ofString
and substring comparisons.
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 like:'ID', 'HREF'
or possibly'CLASS'
, but really anything that legally fits in an HTMLTagNode
TagNode may all be queried.
This interface has many field-references that have exactly the same function (function-pointer references) - but with different names, spellings and abbreviations. The only purpose to this is to allow for the trade-off between code-readability and easy-of-use. If you would like to write "the short-version" of theTextComparitor
, then type the short version! If you thinkDOES_NOT_CONTAIN_CASE_INSENSITIVE
really is easier to read thanCN_CI_NAND
, then use the field with the complete-name, rather than the abbreviated-one.
Some of the full-versus-abbreviated field-names in this class are for the reasons listed below:- Name intended to hi-lite different boolean words, same/inter-changeable meaning - and for brevity.
- Name shortened for brevity, but making for more difficult reading.
- Name intended to hi-lite different boolean words, same/inter-changeable meaning.
- Name changed for alternate-readability version.
Here are some example uses of this class. For each of the examples below, presume that the variable'page'
is some instance of Vectorized-HTML.
Example:
// Retrieves a list of TagNode's which are HTML Anchor elements, and whose CSS "Class" // Attribute-Value is precisely equal to 'MyWidgets'. // // NOTE: If one of these Anchor-Elements actually has multiple CSS "class" Attribute-Values // specified, the invocation below might not return your intended results! Vector<TagNode> anchors1 = InnerTagGet.all (page, "a", "class", TextComparitor.EQ_CI_TRM, "MyWidgets"); // Returns all Anchor Elements whose CSS "Class" Attribute-Value has a 'MyWidgets' String-Token // // NOTE: Even if one of the Anchor's has multiple CSS classes specified (meaning that // Attribute-Value does not actually equal "MyWidgets") the intended comparison succeeds. 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 // CSS 'class' Attribute-Value does not contain 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' Vector<TagNode> divs = InnerTagGet.all (page, "div", "class", TextComparitor.C_OR, "MyWidgets", "MyPanels");
Here are more examples, these searching forTextNode
instances. Make note that the purpose of having one field with name having "OR" and one without - is merely to hilite the point that inclusive-or is the default behaviour of the comparison-searches.
Example:
// This following four requests use different spellings of the same static-field reference. // The result of all four lines-of-code here produce identical results. // This example hopefully shows the trade-off between readability and easy-typing. Vector<TextNode> txt1 = TextNodeGet.all (page, TextComparitor.CONTAINS_CASE_INSENSITIVE, "Bob", "Xavier", "Pablo"); Vector<TextNode> txt2 = TextNodeGet.all (page, TextComparitor.CONTAINS_CASE_INSENSITIVE_OR, "Bob", "Xavier", "Pablo"); Vector<TextNode> txt3 = TextNodeGet.all (page, TextComparitor.CN_CI, "Bob", "Xavier", "Pablo"); Vector<TextNode> txt4 = TextNodeGet.all (page, TextComparitor.CN_CI_OR, "Bob", "Xavier", "Pablo"); assert txt1.equals(txt2) && txt2.equals(txt3) && txt3.equals(txt4)
Hi-Lited Source-Code:- View Here: Torello/HTML/NodeSearch/TextComparitor.java
- Open New Browser-Tab: Torello/HTML/NodeSearch/TextComparitor.java
File Size: 61,924 Bytes Line Count: 1,269 '\n' Characters Found
-
-
Field Summary
-
Method Summary
@FunctionalInterface: (Lambda) Method Modifier and Type Method boolean
test(String str, String[] compareText)
Reflection Method: Field-Name as String Modifier and Type Method static String
getName(TextComparitor tc)
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable
. Using theSerializable
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:
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
StrTokCmpr.containsOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CSS_CLASS_OR = StrTokCmpr::containsOR;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
StrTokCmpr.containsAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CSS_CLASS_AND = StrTokCmpr::containsAND;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
StrTokCmpr.containsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CSS_CLASS_NAND = StrTokCmpr::containsNAND;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
StrTokCmpr.containsXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CSS_CLASS_XOR = StrTokCmpr::containsXOR;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
CONTAINS_CSS_CLASS_OR
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor C_OR = CONTAINS_CSS_CLASS_OR;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
CONTAINS_CSS_CLASS_AND
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor C_AND = CONTAINS_CSS_CLASS_AND;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
CONTAINS_CSS_CLASS_NAND
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor C_NAND = CONTAINS_CSS_CLASS_NAND;
- ① white-space (matching
-
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 an "XOR" CSS-Class-Selector, rather than an "OR" CSS-Class-Selector.
NOTE: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
CONTAINS_CSS_CLASS_XOR
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor C_XOR = CONTAINS_CSS_CLASS_XOR;
- ① white-space (matching
-
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: Allstatic
-member fields ofclass 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).
As an example, a query asking forTagNode's
having CSSCLASS=foo
, with an HTML Element such as:'<DIV CLASS=foobar>'
requires Token-Matching! AToken Matching Algorithm
will, properly, reject this<DIV>
element, which is the correct action. A simple (substring) call tocssAtribute.contains("foo")
would (erroneously) accept this<DIV>
element.
A 'token' can only match the CSS AttributeCLASS=String
if its match position-index inside theString
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'^'
) - ③
String
-terminus (matching'$'
)
- See Also:
C_OR
,CONTAINS_CSS_CLASS_OR
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor C = C_OR;
- ① white-space (matching
-
EQ
static final TextComparitor EQ
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If precisely one of the compare-String's
equal the attribute-value orTextNode
, then and only then will thisBiPredicate
returnTRUE
.- See Also:
StrCmpr.equalsXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor EQ = StrCmpr::equalsXOR;
-
NOT_EQ
static final TextComparitor NOT_EQ
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
.- See Also:
StrCmpr.equalsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor NOT_EQ = StrCmpr::equalsNAND;
-
EQ_NAND
static final TextComparitor EQ_NAND
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. This function-pointer is identical to the one namedNOT_EQ
.- See Also:
StrCmpr.equalsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor EQ_NAND = StrCmpr::equalsNAND;
-
EQ_CASE_INSENSITIVE
static final TextComparitor EQ_CASE_INSENSITIVE
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If precisely one of the compare-String's
equal the attribute-value orTextNode
, then and only then will thisBiPredicate
returnTRUE
. 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:
public static final TextComparitor EQ_CASE_INSENSITIVE = StrCmpr::equalsXOR_CI;
-
EQ_CI
static final TextComparitor EQ_CI
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If precisely one of the compare-String's
equal the attribute-value orTextNode
, then and only then will thisBiPredicate
returnTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identicalTextComparitor
EQ_CASE_INSENSITIVE
.- See Also:
StrCmpr.equalsXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor EQ_CI = StrCmpr::equalsXOR_CI;
-
NOT_EQ_CASE_INSENSITIVE
static final TextComparitor NOT_EQ_CASE_INSENSITIVE
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. 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:
public static final TextComparitor NOT_EQ_CASE_INSENSITIVE = StrCmpr::equalsNAND_CI;
-
NOT_EQ_CI
static final TextComparitor NOT_EQ_CI
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identicalTextComparitor
NOT_EQ_CASE_INSENSITIVE
.- See Also:
StrCmpr.equalsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor NOT_EQ_CI = StrCmpr::equalsNAND_CI;
-
EQ_CI_NAND
static final TextComparitor EQ_CI_NAND
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identicalTextComparitor
NOT_EQ_CASE_INSENSITIVE
.- See Also:
StrCmpr.equalsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor EQ_CI_NAND = StrCmpr::equalsNAND_CI;
-
EQ_TRM
static final TextComparitor EQ_TRM
Will compare an attribute-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If precisely one of the compare-String's
equal the attribute-value orTextNode
, then and only then will thisBiPredicate
returnTRUE
. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. This function-pointer is identical to the one namedNOT_EQ
. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If precisely one of the compare-String's
equal the attribute-value orTextNode
, then and only then will thisBiPredicate
returnTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If precisely one of the compare-String's
equal the attribute-value orTextNode
, then and only then will thisBiPredicate
returnTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identicalTextComparitor
EQ_CASE_INSENSITIVE_TRIM
. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. This is an abbreviated version of the identicalTextComparitor
NOT_EQ_CASE_INSENSITIVE_TRIM
. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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-valueString
, orTextNode
for equality against a list of possibleString
-match candidates. If and only if none of the candidates are equal, can thisBiPredicate
evaluate toTRUE
. In this function-pointer, the comparison performed will ignore the case of the arguments. Before the equality-comparison is performed, thejava.lang.String.trim()
method will be invoked on the attribute-value orTextNode
.- See Also:
StrCmpr.equalsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 orTextNode
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:
public static final TextComparitor CONTAINS = StrCmpr::containsOR;
-
CONTAINS_AND
static final TextComparitor CONTAINS_AND
Checks an attribute-value orTextNode
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:
public static final TextComparitor CONTAINS_AND = StrCmpr::containsAND;
-
CONTAINS_XOR
static final TextComparitor CONTAINS_XOR
Checks an attribute-value orTextNode
to identify if it will match precisely one and only oneString
from a list of compare-String's
.- See Also:
StrCmpr.containsXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_XOR = StrCmpr::containsXOR;
-
CONTAINS_NAND
static final TextComparitor CONTAINS_NAND
Checks an attribute-value orTextNode
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:
public static final TextComparitor CONTAINS_NAND = StrCmpr::containsNAND;
-
CONTAINS_OR
static final TextComparitor CONTAINS_OR
Checks an attribute-value orTextNode
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:
public static final TextComparitor CONTAINS_OR = StrCmpr::containsOR;
-
CN
static final TextComparitor CN
Checks an attribute-value orTextNode
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 toCONTAINS
(and alsoCONTAINS_OR
).- See Also:
StrCmpr.containsOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN = StrCmpr::containsOR;
-
CN_OR
static final TextComparitor CN_OR
Checks an attribute-value orTextNode
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 toCONTAINS_OR
(and alsoCONTAINS
).- See Also:
StrCmpr.containsOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_OR = StrCmpr::containsOR;
-
CN_AND
static final TextComparitor CN_AND
Checks an attribute-value orTextNode
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 toCONTAINS_AND
.- See Also:
StrCmpr.containsAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_AND = StrCmpr::containsAND;
-
CN_XOR
static final TextComparitor CN_XOR
Checks an attribute-value orTextNode
to identify if it will match precisely one and only oneString
from a list of compare-String's
. This field instance has an abbreviated name (for convenience), but identical function-pointer toCONTAINS_XOR
.- See Also:
StrCmpr.containsXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_XOR = StrCmpr::containsXOR;
-
CN_NAND
static final TextComparitor CN_NAND
Checks an attribute-value orTextNode
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 toCONTAINS_NAND
.- See Also:
StrCmpr.containsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_NAND = StrCmpr::containsNAND;
-
NOT_CN
static final TextComparitor NOT_CN
Checks an attribute-value orTextNode
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-definedstatic
fields in this class. It's function pointer is identical to:CN_NAND
,CONTAINS_NAND
andDOES_NOT_CONTAIN
.- See Also:
StrCmpr.containsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor NOT_CN = StrCmpr::containsNAND;
-
DOES_NOT_CONTAIN
static final TextComparitor DOES_NOT_CONTAIN
Checks an attribute-value orTextNode
to ensure that it does not contain any matches with the list of compare-String's
. It's function pointer is identical to:CN_NAND
,CONTAINS_NAND
andNOT_CN
.- See Also:
StrCmpr.containsNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_CONTAIN = StrCmpr::containsNAND;
-
CONTAINS_CASE_INSENSITIVE
static final TextComparitor CONTAINS_CASE_INSENSITIVE
Similar topublic static
fieldCONTAINS
, this function-pointer checks an attribute-value orTextNode
to identify whether it contains at least one match out of a list compare-String's
. The difference between this field and the aforementionedpublic static
field is that this one ('CONTAINS_CASE_INSENSITIVE'
) ignores the case of the lettering when performing theString
comparisons.- See Also:
StrCmpr.containsOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CASE_INSENSITIVE = StrCmpr::containsOR_CI;
-
CONTAINS_CASE_INSENSITIVE_AND
static final TextComparitor CONTAINS_CASE_INSENSITIVE_AND
Just likepublic static
fieldCONTAINS_AND
, this function-pointer checks an attribute-value orTextNode
to identify whether it contains a match for every string in the list compare-String's
. The difference between this field and the aforementionedpublic static
field is that this one ('CONTAINS_CASE_INSENSITIVE_AND'
) ignores the case of the lettering when performing theString
comparisons.- See Also:
StrCmpr.containsAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CASE_INSENSITIVE_AND = StrCmpr::containsAND_CI;
-
CONTAINS_CASE_INSENSITIVE_XOR
static final TextComparitor CONTAINS_CASE_INSENSITIVE_XOR
Similar topublic static
fieldCONTAINS_XOR
, this function-pointer checks an attribute-value orTextNode
to identify if it will match precisely one and only oneString
from a list of compare-String's
. The difference between this field and the aforementionedpublic static
field is that this one ('CONTAINS_CASE_INSENSITIVE_XOR'
) ignores the case of the lettering when performing theString
comparisons.- See Also:
StrCmpr.containsXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CASE_INSENSITIVE_XOR = StrCmpr::containsXOR_CI;
-
CONTAINS_CASE_INSENSITIVE_NAND
static final TextComparitor CONTAINS_CASE_INSENSITIVE_NAND
Just likepublic static
fieldCONTAINS_NAND
, this function pointer checks an attribute-value orTextNode
to ensure that it does not contain any matches with the list of compare-String's
. The difference between this field and the aforementionedpublic static
field is that this one ('CONTAINS_CASE_INSENSITIVE_NAND'
) ignores the case of the lettering when performing theString
comparisons.- See Also:
StrCmpr.containsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CASE_INSENSITIVE_NAND = StrCmpr::containsNAND_CI;
-
CONTAINS_CASE_INSENSITIVE_OR
static final TextComparitor CONTAINS_CASE_INSENSITIVE_OR
Similar topublic static
fieldCONTAINS_OR
, this function-pointer checks an attribute-value orTextNode
to identify whether it contains at least one match out of a list of compare-String's
. The difference between this field and the aforementionedpublic static
field is that this one ('CONTAINS_CASE_INSENSITIVE_OR'
) ignores the case of the lettering when performing theString
comparisons.- See Also:
StrCmpr.containsOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CONTAINS_CASE_INSENSITIVE_OR = StrCmpr::containsOR_CI;
-
CN_CI
static final TextComparitor CN_CI
This function pointer's name is just an abbreviation for thepublic static
field namedCONTAINS_CASE_INSENSITIVE
. It points to the same method inclass StrCmpr
.- See Also:
StrCmpr.containsOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_CI = StrCmpr::containsOR_CI;
-
CN_CI_OR
static final TextComparitor CN_CI_OR
This function pointer's name is just an abbreviation for thepublic static
field namedCONTAINS_CASE_INSENSITIVE_OR
. It points to the same method inclass StrCmpr
.- See Also:
StrCmpr.containsOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_CI_OR = StrCmpr::containsOR_CI;
-
CN_CI_AND
static final TextComparitor CN_CI_AND
This function pointer's name is just an abbreviation for thepublic static
field namedCONTAINS_CASE_INSENSITIVE_AND
. It points to the same method inclass StrCmpr
.- See Also:
StrCmpr.containsAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_CI_AND = StrCmpr::containsAND_CI;
-
CN_CI_XOR
static final TextComparitor CN_CI_XOR
This function pointer's name is just an abbreviation for thepublic static
field namedCONTAINS_CASE_INSENSITIVE_XOR
. It points to the same method inclass StrCmpr
.- See Also:
StrCmpr.containsXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_CI_XOR = StrCmpr::containsXOR_CI;
-
CN_CI_NAND
static final TextComparitor CN_CI_NAND
This function pointer's name is just an abbreviation for thepublic static
field namedCONTAINS_CASE_INSENSITIVE_NAND
. It points to the same method inclass StrCmpr
.- See Also:
StrCmpr.containsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor CN_CI_NAND = StrCmpr::containsNAND_CI;
-
NOT_CN_CI
static final TextComparitor NOT_CN_CI
This function pointer checks an attribute-value orTextNode
to ensure that it does not contain any matches with the list of compare-String's
. The comparisons method used ignores the case of the text in the string parameters. Do note that all four of the followingstatic
fieldsNOT_CN_CI
,DOES_NOT_CONTAIN_CASE_INSENSITIVE
,CN_CI_NAND
andCONTAINS_CASE_INSENSITIVE_NAND
point to the sameStrCmpr
method. Since the variable names trade-off readability and brevity, this is done for convenience.- See Also:
StrCmpr.containsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor NOT_CN_CI = StrCmpr::containsNAND_CI;
-
DOES_NOT_CONTAIN_CASE_INSENSITIVE
static final TextComparitor DOES_NOT_CONTAIN_CASE_INSENSITIVE
This function pointer checks an attribute-value orTextNode
to ensure that it does not contain any matches with the list of compare-String's
. The comparisons method used ignores the case of the text in the string parameters. Do note that all four of the followingstatic
fieldsNOT_CN_CI
,DOES_NOT_CONTAIN_CASE_INSENSITIVE
,CN_CI_NAND
, andCONTAINS_CASE_INSENSITIVE_NAND
point to the sameStrCmpr
method. Since the variable names trade-off readability and brevity, this is done for convenience.- See Also:
StrCmpr.containsNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_CONTAIN_CASE_INSENSITIVE = StrCmpr::containsNAND_CI;
-
STARTS_WITH
static final TextComparitor STARTS_WITH
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor STARTS_WITH = StrCmpr::startsWithXOR;
-
DOES_NOT_START_WITH
static final TextComparitor DOES_NOT_START_WITH
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_START_WITH = StrCmpr::startsWithNAND;
-
STARTS_WITH_CASE_INSENSITIVE
static final TextComparitor STARTS_WITH_CASE_INSENSITIVE
Nearly identical toSTARTS_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 toDOES_NOT_START_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldSTARTS_WITH
.
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_START_WITH
.
In fact, the following are all identical method references:
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_START_WITH
.
In fact, the following are all identical method references:
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldSTARTS_WITH_CASE_INSENSITIVE
.
Nearly identical toSTARTS_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_START_WITH_CASE_INSENSITIVE
.
In fact, the following are all identical method references:DOES_NOT_START_WITH_CASE_INSENSITIVE
NOT_SW_CI
SW_CI_NAND
StrCmpr.startsWithNAND_CI(String, String[])
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Nearly identical toDOES_NOT_START_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_START_WITH_CASE_INSENSITIVE
.
In fact, the following are all identical method references:DOES_NOT_START_WITH_CASE_INSENSITIVE
NOT_SW_CI
SW_CI_NAND
StrCmpr.startsWithNAND_CI(String, String[])
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Nearly identical toDOES_NOT_START_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the initial characters (the 'start' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.startsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor SW_CI_NAND = StrCmpr::startsWithNAND_CI;
-
STARTS_WITH_TRIM
static final TextComparitor STARTS_WITH_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldSTARTS_WITH
.- See Also:
StrCmpr.startsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldDOES_NOT_START_WITH
.- See Also:
StrCmpr.startsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_START_WITH_TRIM = (String s, String[] sArr) -> StrCmpr.startsWithNAND(s.trim(), sArr);
-
STARTS_WITH_CASE_INSENSITIVE_TRIM
static final TextComparitor STARTS_WITH_CASE_INSENSITIVE_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldSTARTS_WITH_CASE_INSENSITIVE
.- See Also:
StrCmpr.startsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor STARTS_WITH_CASE_INSENSITIVE_TRIM = (String s, String[] sArr) -> StrCmpr.startsWithXOR_CI(s.trim(), sArr);
-
DOES_NOT_START_WITH_CASE_INSENSITIVE_TRIM
static final TextComparitor DOES_NOT_START_WITH_CASE_INSENSITIVE_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldDOES_NOT_START_WITH_CASE_INSENSITIVE
.- See Also:
StrCmpr.startsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_START_WITH_CASE_INSENSITIVE_TRIM = (String s, String[] sArr) -> StrCmpr.startsWithNAND_CI(s.trim(), sArr);
-
SW_TRM
static final TextComparitor SW_TRM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldSW
.- See Also:
StrCmpr.startsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor SW_TRM = (String s, String[] sArr) -> StrCmpr.startsWithXOR(s.trim(), sArr);
-
NOT_SW_TRM
static final TextComparitor NOT_SW_TRM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldNOT_SW
.- See Also:
StrCmpr.startsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldSW_NAND
.- See Also:
StrCmpr.startsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldSW_CI
.- See Also:
StrCmpr.startsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldNOT_SW_CI
.- See Also:
StrCmpr.startsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldSW_CI_NAND
.- See Also:
SW_CI_NAND
,StrCmpr.startsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor ENDS_WITH = StrCmpr::endsWithXOR;
-
DOES_NOT_END_WITH
static final TextComparitor DOES_NOT_END_WITH
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_END_WITH = StrCmpr::endsWithNAND;
-
ENDS_WITH_CASE_INSENSITIVE
static final TextComparitor ENDS_WITH_CASE_INSENSITIVE
Nearly identical toENDS_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 toDOES_NOT_END_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldENDS_WITH
.
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_END_WITH
.
In fact, the following are all identical method references:
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_END_WITH
.
In fact, the following are all identical method references:
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldENDS_WITH_CASE_INSENSITIVE
.
Nearly identical toENDS_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will match with precisely one of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_END_WITH_CASE_INSENSITIVE
.
In fact, the following are all identical method references:
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Nearly identical toDOES_NOT_END_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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 fieldDOES_NOT_END_WITH_CASE_INSENSITIVE
.
In fact, the following are all identical method references:
They are just abbreviated names to allow for trading-off 'code readability' and brevity.
Nearly identical toDOES_NOT_END_WITH
, but here the function-pointer points to a method that ignores case when performing the comparisons. Thispublic static
field checks an input 'sourceString
' (usually an inner-tag value or aTextNode
) to verify that the ending characters (the 'tail' of the source-String
) will not match with any of the javavar-args String...
compare-String's
list.- See Also:
StrCmpr.endsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor EW_CI_NAND = StrCmpr::endsWithNAND_CI;
-
ENDS_WITH_TRIM
static final TextComparitor ENDS_WITH_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldENDS_WITH
.- See Also:
ENDS_WITH
,StrCmpr.endsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor ENDS_WITH_TRIM = (String s, String[] sArr) -> StrCmpr.endsWithXOR(s.trim(), sArr);
-
DOES_NOT_END_WITH_TRIM
static final TextComparitor DOES_NOT_END_WITH_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldDOES_NOT_END_WITH
.- See Also:
DOES_NOT_END_WITH
,StrCmpr.endsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_END_WITH_TRIM = (String s, String[] sArr) -> StrCmpr.endsWithNAND(s.trim(), sArr);
-
ENDS_WITH_CASE_INSENSITIVE_TRIM
static final TextComparitor ENDS_WITH_CASE_INSENSITIVE_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldENDS_WITH_CASE_INSENSITIVE
.- See Also:
ENDS_WITH_CASE_INSENSITIVE
,StrCmpr.endsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor ENDS_WITH_CASE_INSENSITIVE_TRIM = (String s, String[] sArr) -> StrCmpr.endsWithXOR_CI(s.trim(), sArr);
-
DOES_NOT_END_WITH_CASE_INSENSITIVE_TRIM
static final TextComparitor DOES_NOT_END_WITH_CASE_INSENSITIVE_TRIM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldDOES_NOT_END_WITH_CASE_INSENSITIVE
.- See Also:
DOES_NOT_END_WITH_CASE_INSENSITIVE
,StrCmpr.endsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor DOES_NOT_END_WITH_CASE_INSENSITIVE_TRIM = (String s, String[] sArr) -> StrCmpr.endsWithNAND_CI(s.trim(), sArr);
-
EW_TRM
static final TextComparitor EW_TRM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldEW
.- See Also:
EW
,StrCmpr.endsWithXOR(String, String[])
- Code:
- Exact Field Declaration Expression:
public static final TextComparitor EW_TRM = (String s, String[] sArr) -> StrCmpr.endsWithXOR(s.trim(), sArr);
-
NOT_EW_TRM
static final TextComparitor NOT_EW_TRM
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldNOT_EW
.- See Also:
NOT_EW
,StrCmpr.endsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldEW_NAND
.- See Also:
EW_NAND
,StrCmpr.endsWithNAND(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldEW_CI
.- See Also:
EW_CI
,StrCmpr.endsWithXOR_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldNOT_EW_CI
.- See Also:
NOT_EW_CI
,StrCmpr.endsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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
Invokesjava.lang.String.trim()
on the first input-parameter; although the remainder of thisBiPredicate<String, String[]
is identical topublic static
fieldEW_CI_NAND
.- See Also:
EW_CI_NAND
,StrCmpr.endsWithNAND_CI(String, String[])
- Code:
- Exact Field Declaration Expression:
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)
FunctionalInterface Target-Method:
This method corresponds to the@FunctionalInterface
Annotation's method requirement. It is the only non-default
, non-static
method in this interface, and may be the target of a Lambda-Expression or'::'
(double-colon) Function-Pointer.- Specified by:
test
in interfacejava.util.function.BiPredicate<java.lang.String,java.lang.String[]>
- Parameters:
str
- This is usually a line of text from thepublic final String str
field of the classTextNode
, if the programmer is requesting aTextNode
search. If the search being performed is onTagNode
attribute values, then the value of parameterString htmlText
will be anyString
-text within an HTML Element's attribute value.compareText
- This is a list of different text-String's
to be used by the method that performs the test. View the compare-String's
in the methods of classesStrCmpr
orStrTokCmpr
to understand this more clearly.- Returns:
- After performing the single-input-parameter "version of" the
accept(htmlText, compareText)
method on as many of the elements of theString[] compareText
input-array, this will returnTRUE
orFALSE
dependent on the expected boolean-logic behavior of the comparison. This is simple, as the four primaryboolean
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 theString[] 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 ofTextComparitor
. The lookup method uses Java Reflection. Internal exception & error reporting logic makes use of this method (where it works properly), but if this method is invoked on a user-suppliedTextComparitor
, ths method will not be able to 'guess' the variable or field name from whence that instance was derived or created.
USE: ForEQ_CASE_INSENSITIVE
, this method returns the JavaString
"EQ_CASE_INSENSITIVE"
.
AGAIN:There are certain cases where this method will fail. The test performed here uses a reference-equality comparison. For instance, if the user requests the name of a "Serialized Version" of aTextComparitor
, 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'
(when invoking this method) would not properly return theString 'STARTS_WITH'
PRIMARILY: This method is used by one of the exception reporting mechanisms, and therefore neither relies nor requires serialized, saved, or user-createdTextComparitor's
. For those purposes, retreiving thestatic
field-name of theTextComparitor's
that are passed here will work fine.
AGAIN: This method is used internally for error-reporting.- Parameters:
tc
- An instance of this class,TextComparitor
, which is a also astatic
field member of this class.- Returns:
- If the reference provided is one of the
static
fields which are defined insideTextComparitor
, then the name of that field, as ajava.lang.String
, will be returned. If this is a user-definedTextComparitor
, then it's name will not be found, and 'null' shall be returned instead.
Example:
System.out.println(TextComparitor.getName(TextComparitor.EQ)); // Prints the String: "EQ"
- Code:
- Exact Method Body:
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;
-
-