Package Torello.Java

Class StrTokCmpr


  • public class StrTokCmpr
    extends java.lang.Object
    StrTokCmpr - Documentation.

    This class is identical to class StrCmpr - save one primary difference. The substrings that are tested must be surrounded by white-space, or by a specified character-delimiter test, before the comparison logic considers them to have matched.

    StrTokCmpr =>

    1. StrTok: Token-Matches are substring matches which are found inside a supplied 'srcStr'. These matches must be both fully contained within 'srcStr', and have "match locations" (String-index position in 'srcStr' where the token matches) that are bounded / 'surrounded' by either white-space (space-character '#32', '\n', '\r', etc ) or by characters that pass a user supplied Character-Predicate test().
    2. Cmpr: Each of the methods in this class shall return an boolean that indicates whether the input 'srcStr' matches the method's query-specifications. The various queries in this class are based on the presence or absence of a particular String (parameter 'token(s)') being inside another Source-String (parameter 'srcString').

    Methods Available

    Method-Name Key-Word Explanation
    NAND May not find any matches between the primary String srcStr parameter, and the String's in String... tokens

    NAND-NOTE: There is one very important subtlety about the meaning of 'NAND' here. In this case, the methods that use 'NAND' interpret its meaning as "NOT ANY ONE OF..." - meaning all comparisons must fail.
    XOR Must find precisely one match between the primary String srcStr parameter, and the String's in String... tokens.

    There is one 'philosophical note' which is that if multiple copies of an identical-String are passed via the comparison-Stringarray (String... tokens), all XOR methods shall not pay heed to the notion that they the 'srcStr' parameter may have only started-with, ended-with or contained a single String (and 'philosophically passing' the XOR, one-and-only-one test). The internal-logical is 'programmatically ignorant' of this - multiple copies of an identical-String (or identical, ignoring-case) could theoretically be flagged via throwing an IllegalArgumentException. However, no such check is performed.
    OR Must find at least one match between the primary String srcStr parameter, and the String's in the 'tokens' parameter.
    AND Must identify a containing-match between each and every String in String... tokens and the primary 'srcStr' parameter.
    Starts With The provided token-String must match each character at the beginning of the String-parameter 'srcStr'. Furthermore, the character immediately after the token-String in 'srcStr' must be either:

    • White-space (matching '\s')
    • String-terminus (matching '$')
    • In situations where an extraDelimiterTest has been passed to the method, characters that receive TRUE from the invokation of the Character-Predicate's test(char) method shall also be considered for a 'Token-Match'.
    Ends With The provided token-String must match each character at the ending of the String-parameter 'srcStr'. Furthermore, the character directly before the token-String in 'srcStr' must be either:

    • White-space (matching '\s')
    • String-start (matching '^')
    • In situations where an extraDelimiterTest has been passed to the method, characters that receive TRUE from the invokation of the Character-Predicate's test(char) method shall also be considered for a 'Token-Match'.
    Contains The provided token-String must be a substring of the String-parameter 'srcStr'. Furthermore, the characters directly before and immediately following the token-String match location in 'srcStr' must assume one of the following values:

    • White-space (matching '\s')
    • String-start (matching '^')
    • String-terminus (matching '$')
    • In situations where an extraDelimiterTest has been passed to the method, characters that receive TRUE from the invokation of the Character-Predicate's test(char) method shall also be considered for a 'Token-Match'.
    CI (Case Insensitive) All equality-tests will be done on a Case Insensitive basis.

    Method Parameters

    Parameter Explanation
    String srcStr This parameter is mandatory for every method here. It is the source String that is being searched. Every method is designed to iterate through the characters in this String, searching for matches of token(s).
    int nth This represents the 'nth' match of a comparison for-loop. When the method-signature used includes the parameter 'nth' , the first n-1 matches that are found - will be skipped, and the 'nth' match is, instead, returned.

    EXCEPTIONS: An NException shall throw if the value of parameter 'nth' is zero, negative, or larger than the size of the input html-Vector.
    int sPos, int ePos When these parameters are present, only substring's that are found between these specified String indices will be considered when returning results from StrTokIndexOf.

    NOTE: In every situation where the parameters int sPos, int ePos are used, parameter 'ePos' will accept a negative value, but parameter 'sPos' will not. When 'ePos' is passed a negative-value, the internal LV ('Loop Variable Counter') will have its public final int end field set to the length of the 'srcStr' parameter String.

    EXCEPTIONS: An IndexOutOfBoundsException will be thrown if:

    • If sPos is negative, or if sPos is greater-than or equal-to the size of 'srcStr'
    • If ePos is zero, or greater than the size 'srcStr'.
    • If sPos is a larger integer than ePos
    String token This is the testing-substring that is this class' search goal. When this String is identified as a substring of the input-parameter String 'srcStr', a potential match has been found. In order for potential matches to be returned as results, they are subsequently tested for surrounding white-space (or the additional 'extraDelimiterTest'). The requirements for a potential match to be returned as a Token Match are as follows:

    • The location of 'token' in 'srcStr' must be bounded by white-space, or be located at the very beginning or ending of the 'srcStr'.
    • If an extraDelimiterTest has been provided, the location of 'token' in 'srcStr' may also be bounded by characters that are a match with the Character-Predicate 'test(char)' method.
    • And, of course, the 'token' must be a substring of 'srcStr'
    String... tokens Each of the 'token' String's passed using Varargs array parameter 'tokens' must follow the exact same rules explained in the previous parameter entry (directly above) in order to be considered token-matches with/for input parameter 'srcStr'. All the Varargs String-Array adds is that it facilitates testing multiple tokens all at the same time so that their comparison-results can be AND'ed, OR'ed, NAND'ed, etc...
    Predicate<Character> extraDelimiterTest When this parameter is present in the method-signature parameter-list, the decision of whether a Token-Match is to be included in the search result-set can be made less restrictive. Usually, a match must be delimited by white-space; meaning that the characters directly before and after the match location in 'srcStr' must be white-space, or the String terminus (Regex: '^' and '$').

    However, when this parameter is part of a method signature, the method body in this class that implements this search will also permit a token-match location to be bounded by characters that pass this Character-Predicate's Predicate.test(char) method.

    For instance, if (Character c) -> ",.!?()".contains("" + c) were passed to this parameter, then: commas, periods, exclamation-points, question-marks, and parenthesis would all be allowed directly before or immediately after the token-match location of the 'token' parameter inside String 'srcStr'.


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

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

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

    Static Fields: The methods in this class do not create any internal state that is maintained - however there are a few private & static fields defined. These fields are instantiated only once during the Class Loader phase (and only if this class shall be used), and serve as data 'lookup' fields (static constants). View this class' source-code in the link provided below to see internally used data.

    This class maintains two public, static fields that can be useful for debugging. These fields include a 'Debug' Consumer<String> DEBUG_LOG for accepting log-notices when using this class, and an boolean DEBUG for turning this feature on and off.



    • Field Summary

      Fields 
      Modifier and Type Field
      protected static byte AND
      static boolean DEBUG
      static Consumer<String> DEBUG_LOG
      protected static byte NAND
      protected static byte OR
      protected static byte XOR
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method
      protected static boolean AND​(String methodName, String srcStr, String[] tokens, Predicate<String> pred)
      static boolean contains​(String srcStr, int sPos, int ePos, String token)
      static boolean contains​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)
      static boolean contains​(String srcStr, String token)
      static boolean contains​(String srcStr, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean contains​(String srcStr, LV l, String token)
      protected static boolean contains​(String srcStr, LV l, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean CONTAINS​(boolean ignoresCase, byte booleanOperation, String srcStr, String[] tokens)
      protected static boolean CONTAINS​(boolean ignoresCase, byte booleanOperation, String srcStr, Predicate<Character> extraDelimiterTest, String[] tokens)
      protected static boolean CONTAINS​(boolean ignoresCase, byte booleanOperation, LV l, String srcStr, String[] tokens)
      protected static boolean CONTAINS​(boolean ignoresCase, byte booleanOperation, LV l, String srcStr, Predicate<Character> extraDelimiterTest, String[] tokens)
      static boolean containsAND​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsAND​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsAND​(String srcStr, String... tokens)
      static boolean containsAND​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsAND_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsAND_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsAND_CI​(String srcStr, String... tokens)
      static boolean containsAND_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsIgnoreCase​(String srcStr, int sPos, int ePos, String token)
      static boolean containsIgnoreCase​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)
      static boolean containsIgnoreCase​(String srcStr, String token)
      static boolean containsIgnoreCase​(String srcStr, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean containsIgnoreCase​(String srcStr, LV l, String token)
      protected static boolean containsIgnoreCase​(String srcStr, LV l, Predicate<Character> extraDelimiterTest, String token)
      static boolean containsNAND​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsNAND​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsNAND​(String srcStr, String... tokens)
      static boolean containsNAND​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsNAND_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsNAND_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsNAND_CI​(String srcStr, String... tokens)
      static boolean containsNAND_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsOR​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsOR​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsOR​(String srcStr, String... tokens)
      static boolean containsOR​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsOR_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsOR_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsOR_CI​(String srcStr, String... tokens)
      static boolean containsOR_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsXOR​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsXOR​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsXOR​(String srcStr, String... tokens)
      static boolean containsXOR​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsXOR_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean containsXOR_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean containsXOR_CI​(String srcStr, String... tokens)
      static boolean containsXOR_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWith​(String srcStr, int sPos, int ePos, String token)
      static boolean endsWith​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)
      static boolean endsWith​(String srcStr, String token)
      static boolean endsWith​(String srcStr, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean endsWith​(String srcStr, LV l, String token)
      protected static boolean endsWith​(String srcStr, LV l, Predicate<Character> extraDelimiterTest, String token)
      static boolean endsWithIgnoreCase​(String srcStr, int sPos, int ePos, String token)
      static boolean endsWithIgnoreCase​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)
      static boolean endsWithIgnoreCase​(String srcStr, String token)
      static boolean endsWithIgnoreCase​(String srcStr, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean endsWithIgnoreCase​(String srcStr, LV l, String token)
      protected static boolean endsWithIgnoreCase​(String srcStr, LV l, Predicate<Character> extraDelimiterTest, String token)
      static boolean endsWithNAND​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean endsWithNAND​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithNAND​(String srcStr, String... tokens)
      static boolean endsWithNAND​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithNAND_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean endsWithNAND_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithNAND_CI​(String srcStr, String... tokens)
      static boolean endsWithNAND_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithXOR​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean endsWithXOR​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithXOR​(String srcStr, String... tokens)
      static boolean endsWithXOR​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithXOR_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean endsWithXOR_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean endsWithXOR_CI​(String srcStr, String... tokens)
      static boolean endsWithXOR_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      protected static boolean NAND​(String methodName, String srcStr, String[] tokens, Predicate<String> pred)
      protected static boolean OR​(String methodName, String srcStr, String[] tokens, Predicate<String> pred)
      static boolean startsWith​(String srcStr, int sPos, int ePos, String token)
      static boolean startsWith​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)
      static boolean startsWith​(String srcStr, String token)
      static boolean startsWith​(String srcStr, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean startsWith​(String srcStr, LV l, String token)
      protected static boolean startsWith​(String srcStr, LV l, Predicate<Character> extraDelimiterTest, String token)
      static boolean startsWithIgnoreCase​(String srcStr, int sPos, int ePos, String token)
      static boolean startsWithIgnoreCase​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)
      static boolean startsWithIgnoreCase​(String srcStr, String token)
      static boolean startsWithIgnoreCase​(String srcStr, Predicate<Character> extraDelimiterTest, String token)
      protected static boolean startsWithIgnoreCase​(String srcStr, LV l, String token)
      protected static boolean startsWithIgnoreCase​(String srcStr, LV l, Predicate<Character> extraDelimiterTest, String token)
      static boolean startsWithNAND​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean startsWithNAND​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithNAND​(String srcStr, String... tokens)
      static boolean startsWithNAND​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithNAND_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean startsWithNAND_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithNAND_CI​(String srcStr, String... tokens)
      static boolean startsWithNAND_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithXOR​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean startsWithXOR​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithXOR​(String srcStr, String... tokens)
      static boolean startsWithXOR​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithXOR_CI​(String srcStr, int sPos, int ePos, String... tokens)
      static boolean startsWithXOR_CI​(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)
      static boolean startsWithXOR_CI​(String srcStr, String... tokens)
      static boolean startsWithXOR_CI​(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)
      protected static boolean XOR​(String methodName, String srcStr, String[] tokens, Predicate<String> pred)
      • Methods inherited from class java.lang.Object

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

      • DEBUG

        public static boolean DEBUG
        Utility field. You may choose to set this variable to true, and the following String commands will print to an internally stored Consumer<String> DEBUG_LOG class that may be set. This is generally a very minor drain on code-efficiency. When this flag is set to FALSE, a short if-statement evaluation still occurs even when the flag is false on each occasion that the string-comparison loops identify and return a match. This is very minor performance loss, and does provide quite a lot of help to those trying to identify difficult to notice problems with partial-String comparisons.

        IMPORTANT: In order to use this minor debugging feature, it is necessary to provide a Consumer<String> DEBUG_LOG to the public static field! If this field is not set to a valid, non-null object-reference, then this class will through a NullPointerException on its first attempt to compare strings. This String-consumer may do anything it wants with the debug-String information.

        FORMAT: The output string format is just:
        1
        2
        3
         private static void PRNT(String methodName, String srcStr, String token)
         { DEBUG_LOG.accept(methodName + "-MATCH[" + srcStr + ", " + token + "] "); }
         
        

        Generally, you would want to use a simple lambda such as:

        Example:
        1
        2
         StrCmpr.DEBUG_LOG = (String logInfoStr) -> System.out.println(logInfoStr);
         
        


        FINALLY: If you are logging, please note that any of the methods whose name ends with the phrase "IgnoreCase" will not contribute (print) to the log. this is primarily because these are all single-argument comparisons, and logging would be of only minor benefit. The primary benefit of a debug-log is the ability to identify which/when a particular substring from a list of substrings actually matched. The methods whose names contain the two letter acronym "_CI" are all "Case Insensitive" - and they also do comparisons to multiple-input var-args String parameters.
        Code:
        Exact Field Declaration Expression:
        1
        public static boolean DEBUG = false;
        
      • DEBUG_LOG

        public static java.util.function.Consumer<java.lang.String> DEBUG_LOG
        This object reference cannot be null when DEBUG is TRUE. This StorageWriter will receive text-notifications every time the string-comparing loops identify a match.

        IMPORTANT: No attempt has been made to ensure that this debugging feature will operate perfectly in a multi-threaded environment. The two reasons for this are:
        1. The primary purpose of this LOG is for debugging code, not putting details about string-match information into an 'on-line' or production environment.
        2. This is a best-efforts string-comparison package that would sacrifice quite a bit of its utility if it were expected to maintain multiple instances of this class just to have StrCmpr debug operations work in multiple-threads. Code readability necessitates keeping this a class with only static methods.
        3. Two threads making calls to this class StrCmpr might see log-writes that, sadly, look like they 'interlaced' (crashed), but even when this occasions, reading the log wouldn't be that difficult anyway.
        Code:
        Exact Field Declaration Expression:
        1
        public static Consumer<String> DEBUG_LOG = null;
        
      • AND

        protected static final byte AND
        Signifies that an 'AND' operation is required, but only for methods that implement one of the 'contains' variants.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        protected static final byte AND   = 0;
        
      • OR

        protected static final byte OR
        Signifies that an 'AND' operation is required, but only for methods that implement one of the 'contains' variants.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        protected static final byte OR    = 1;
        
      • NAND

        protected static final byte NAND
        Signifies that an 'AND' operation is required, but only for methods that implement one of the 'contains' variants.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        protected static final byte NAND  = 2;
        
      • XOR

        protected static final byte XOR
        Signifies that an 'AND' operation is required, but only for methods that implement one of the 'contains' variants.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        protected static final byte XOR   = 3;
        
    • Method Detail

      • AND

        protected static boolean AND​
                    (java.lang.String methodName,
                     java.lang.String srcStr,
                     java.lang.String[] tokens,
                     java.util.function.Predicate<java.lang.String> pred)
        
        This performs the internal AND. It expects a comparison Predicate in order for the comparison to work.
        Parameters:
        methodName - If printing-debug information is expected, by the DEBUG global-variable, this String is used.
        srcStr - This is the same source-string parameter from all the methods in this class.
        tokens - This is the same var-args string array from all the methods in this class.
        pred - This is the comparison Predicate provided by the methods in this class that call this method.
        Returns:
        The AND of these String's, using the provided Predicate.
        Throws:
        StrCmprException - This exception shall throw if there are any invalid String's in the compare-string parameter array.

        IMPORTANT NOTE: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception 'StrCmprException' if invalid input has been passed to the "Compare String" Variable-Arguments String... Parameter.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         StrCmprException.check(tokens);
        
         for (String cmp: tokens) if (! pred.test(cmp))
         { if (DEBUG) PRNT(methodName + "-MATCHFAIL", srcStr, cmp); return false; }
        
         return true;
        
      • NAND

        protected static boolean NAND​
                    (java.lang.String methodName,
                     java.lang.String srcStr,
                     java.lang.String[] tokens,
                     java.util.function.Predicate<java.lang.String> pred)
        
        This performs the internal NAND. It expects a comparison Predicate in order for the comparison to work.
        Parameters:
        methodName - If printing-debug information is expected, by the DEBUG global-variable, this String is used.
        srcStr - This is the same source-string parameter from all the methods in this class.
        tokens - This is the same var-args string array from all the methods in this class.
        pred - This is the comparison Predicate provided by the methods in this class that call this method.
        Returns:
        The NAND of these String's, using the provided Predicate.
        Throws:
        StrCmprException - This exception shall throw if there are any invalid String's in the compare-string parameter array.

        IMPORTANT NOTE: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception 'StrCmprException' if invalid input has been passed to the "Compare String" Variable-Arguments String... Parameter.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         StrCmprException.check(tokens); 
        
         for (String cmp: tokens) if (pred.test(cmp))
         { if (DEBUG) PRNT(methodName + "-MATCH", srcStr, cmp); return false; }
        
         return true;
        
      • OR

        protected static boolean OR​
                    (java.lang.String methodName,
                     java.lang.String srcStr,
                     java.lang.String[] tokens,
                     java.util.function.Predicate<java.lang.String> pred)
        
        This performs the internal OR. It expects a comparison Predicate in order for the comparison to work.
        Parameters:
        methodName - If printing-debug information is expected, by the DEBUG global-variable, this String is used.
        srcStr - This is the same source-string parameter from all the methods in this class.
        tokens - This is the same var-args string array from all the methods in this class.
        pred - This is the comparison Predicate provided by the methods in this class that call this method.
        Returns:
        The OR of these String's, using the provided Predicate.
        Throws:
        StrCmprException - This exception shall throw if there are any invalid String's in the compare-string parameter array.

        IMPORTANT NOTE: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception 'StrCmprException' if invalid input has been passed to the "Compare String" Variable-Arguments String... Parameter.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         StrCmprException.check(tokens);
        
         for (String cmp: tokens) if (pred.test(cmp))
         { if (DEBUG) PRNT(methodName + "-MATCH", srcStr, cmp); return true; }
        
         return false;
        
      • XOR

        protected static boolean XOR​
                    (java.lang.String methodName,
                     java.lang.String srcStr,
                     java.lang.String[] tokens,
                     java.util.function.Predicate<java.lang.String> pred)
        
        This performs the internal XOR. It expects a comparison Predicate in order for the comparison to work.
        Parameters:
        methodName - If printing-debug information is expected, by the DEBUG global-variable, this String is used.
        srcStr - This is the same source-string parameter from all the methods in this class.
        tokens - This is the same var-args string array from all the methods in this class.
        pred - This is the comparison Predicate provided by the methods in this class that call this method.
        Returns:
        The XOR of these String's, using the provided Predicate.
        Throws:
        StrCmprException - This exception shall throw if there are any invalid String's in the compare-string parameter array.

        IMPORTANT NOTE: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception 'StrCmprException' if invalid input has been passed to the "Compare String" Variable-Arguments String... Parameter.
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
         StrCmprException.check(tokens); 
        
         int count=0;
        
         for (String cmp: tokens)
             if (pred.test(cmp))
                 if (++count > 1)
                 { if (DEBUG) PRNT(methodName + "-MATCH", srcStr, cmp); return false; }
        
         return count == 1;
        
      • containsOR

        public static boolean containsOR​(java.lang.String srcStr,
                                         java.lang.String... tokens)
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, OR, srcStr, tokens);
        
      • containsAND

        public static boolean containsAND​(java.lang.String srcStr,
                                          java.lang.String... tokens)
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, AND, srcStr, tokens);
        
      • containsXOR

        public static boolean containsXOR​(java.lang.String srcStr,
                                          java.lang.String... tokens)
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, XOR, srcStr, tokens);
        
      • containsNAND

        public static boolean containsNAND​(java.lang.String srcStr,
                                           java.lang.String... tokens)
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is an "NOT-AND" (NOT-ANY) comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, NAND, srcStr, tokens);
        
      • containsOR_CI

        public static boolean containsOR_CI​(java.lang.String srcStr,
                                            java.lang.String... tokens)
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, OR, srcStr, tokens);
        
      • containsAND_CI

        public static boolean containsAND_CI​(java.lang.String srcStr,
                                             java.lang.String... tokens)
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, AND, srcStr, tokens);
        
      • containsXOR_CI

        public static boolean containsXOR_CI​(java.lang.String srcStr,
                                             java.lang.String... tokens)
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, XOR, srcStr, tokens);
        
      • containsNAND_CI

        public static boolean containsNAND_CI​(java.lang.String srcStr,
                                              java.lang.String... tokens)
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is a "NOT-AND" (NOT-ANY) comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, NAND, srcStr, tokens);
        
      • endsWithXOR

        public static boolean endsWithXOR​(java.lang.String srcStr,
                                          java.lang.String... tokens)
        Checks if one String srcStr matches any ending from a list of possible endings. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of tokens, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        XOR(String, String, String[], Predicate), endsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return XOR("endsWithXOR", srcStr, tokens, cmp -> endsWith(srcStr, new LV(srcStr, 0, -1), cmp));
        
      • endsWithNAND

        public static boolean endsWithNAND​(java.lang.String srcStr,
                                           java.lang.String... tokens)
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]'). The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        NAND(String, String, String[], Predicate), endsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return NAND("endsWithNAND", srcStr, tokens, cmp -> endsWith(srcStr, new LV(srcStr, 0, -1), cmp));
        
      • startsWithXOR

        public static boolean startsWithXOR​(java.lang.String srcStr,
                                            java.lang.String... tokens)
        Checks if one String srcStr matches any start from a list of possible beginning-String's. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        XOR(String, String, String[], Predicate), startsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return XOR("startsWithXOR", srcStr, tokens, cmp -> startsWith(srcStr, new LV(srcStr, 0, -1), cmp));
        
      • startsWithNAND

        public static boolean startsWithNAND​(java.lang.String srcStr,
                                             java.lang.String... tokens)
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]'). The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        NAND(String, String, String[], Predicate), startsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return NAND("startsWithNAND", srcStr, tokens, cmp -> startsWith(srcStr, new LV(srcStr, 0, -1), cmp));
        
      • endsWithXOR_CI

        public static boolean endsWithXOR_CI​(java.lang.String srcStr,
                                             java.lang.String... tokens)
        Checks if one String srcStr matches any ending from a list of possible endings.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        endsWithIgnoreCase(String, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
         return XOR("endsWithXOR_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, cmp));
        
      • endsWithNAND_CI

        public static boolean endsWithNAND_CI​(java.lang.String srcStr,
                                              java.lang.String... tokens)
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]').

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        endsWithIgnoreCase(String, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
         return NAND("endsWithNAND_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, cmp));
        
      • startsWithXOR_CI

        public static boolean startsWithXOR_CI​(java.lang.String srcStr,
                                               java.lang.String... tokens)
        Checks if one String srcStr matches any start from a list of possible beginning-String's.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        startsWithIgnoreCase(String, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
         return XOR("startsWithXOR_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, cmp));
        
      • startsWithNAND_CI

        public static boolean startsWithNAND_CI​(java.lang.String srcStr,
                                                java.lang.String... tokens)
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]')

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        startsWithIgnoreCase(String, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
         return NAND("startsWithNAND_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, cmp));
        
      • startsWith

        public static boolean startsWith​(java.lang.String srcStr,
                                         java.lang.String token)
        This performs the exact same comparison as Java's String.startsWith(String), but checks for white-space at the end of the token-match. The test performed is case-sensitive.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        Returns:
        TRUE if srcStr starts with token, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
         return  srcStr.startsWith(token)
                 && (    (token.length() == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(token.length())));
        
      • endsWith

        public static boolean endsWith​(java.lang.String srcStr,
                                       java.lang.String token)
        This performs the exact same comparison as Java's String.endsWith(String) method, but checks for white-space at the beginning of the token-match. The test performed is case-sensitive.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        Returns:
        TRUE if srcStr ends with token, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
         return  srcStr.endsWith(token)
                 &&  (   (token.length() == srcStr.length())
                     ||  (Character.isWhitespace(srcStr.charAt(srcStr.length() - token.length() - 1))));
        
      • contains

        public static boolean contains​(java.lang.String srcStr,
                                       java.lang.String token)
        This performs the exact same comparison as Java's String.contains(String) method, but checks for white-space at the beginning and the ending of the token-match. The test performed is case-sensitive.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if token is a substring of srcStr, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
         int tokenLen    = token.length();
         int loopLen     = srcStr.length() - tokenLen;
        
         for (int i=0; i <= loopLen; i++)
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (   (i == 0)
                     ||  Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (   ((i + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(i + tokenLen)))
                 )
                 return true;
        
         return false;
        
      • startsWithIgnoreCase

        public static boolean startsWithIgnoreCase​(java.lang.String srcStr,
                                                   java.lang.String token)
        This performs the exact same comparison as Java's String.startsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not an 'startsWithIgnoreCase()'. This method does that - and also checks for white-space at the end of the token-match.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        Returns:
        TRUE if srcStr starts with token (ignoring-case), and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
         return  srcStr.regionMatches(true, 0, token, 0, token.length())
                 && (    (token.length() == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(token.length())));
        
      • endsWithIgnoreCase

        public static boolean endsWithIgnoreCase​(java.lang.String srcStr,
                                                 java.lang.String token)
        This performs the exact same comparison as Java's String.endsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not an 'endsWithIgnoreCase()'. This method does that - and also checks for white-space at the beginning of the token-match.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        Returns:
        TRUE if srcStr ends with token (ignoring-case), and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
         int startPos = srcStr.length() - tokenLen;
        
         return  srcStr.regionMatches(true, startPos, token, 0, tokenLen)
                 &&  (   (tokenLen == srcStr.length())
                     ||  (Character.isWhitespace(srcStr.charAt(startPos - 1))));
        
      • containsIgnoreCase

        public static boolean containsIgnoreCase​(java.lang.String srcStr,
                                                 java.lang.String token)
        This performs the exact same comparison as Java's String.contains(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'containsIgnoreCase()'. This method just that - and also checks for white-space at the beginning and ending of the token-match.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Returns:
        TRUE if token is a substring of srcStr (ignoring-case), and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        containsIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return containsIgnoreCase(srcStr, new LV(srcStr, 0, srcStr.length()), token);
        
      • containsOR

        public static boolean containsOR​(java.lang.String srcStr,
                                         int sPos,
                                         int ePos,
                                         java.lang.String... tokens)
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, OR, l, srcStr, tokens);
        
      • containsAND

        public static boolean containsAND​(java.lang.String srcStr,
                                          int sPos,
                                          int ePos,
                                          java.lang.String... tokens)
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, AND, l, srcStr, tokens);
        
      • containsXOR

        public static boolean containsXOR​(java.lang.String srcStr,
                                          int sPos,
                                          int ePos,
                                          java.lang.String... tokens)
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, XOR, l, srcStr, tokens);
        
      • containsNAND

        public static boolean containsNAND​(java.lang.String srcStr,
                                           int sPos,
                                           int ePos,
                                           java.lang.String... tokens)
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is an "NOT-AND" (NOT-ANY) comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, NAND, l, srcStr, tokens);
        
      • containsOR_CI

        public static boolean containsOR_CI​(java.lang.String srcStr,
                                            int sPos,
                                            int ePos,
                                            java.lang.String... tokens)
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, OR, l, srcStr, tokens);
        
      • containsAND_CI

        public static boolean containsAND_CI​(java.lang.String srcStr,
                                             int sPos,
                                             int ePos,
                                             java.lang.String... tokens)
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, AND, l, srcStr, tokens);
        
      • containsXOR_CI

        public static boolean containsXOR_CI​(java.lang.String srcStr,
                                             int sPos,
                                             int ePos,
                                             java.lang.String... tokens)
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will also be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, XOR, l, srcStr, tokens);
        
      • containsNAND_CI

        public static boolean containsNAND_CI​(java.lang.String srcStr,
                                              int sPos,
                                              int ePos,
                                              java.lang.String... tokens)
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is a "NOT-AND" (NOT-ANY) comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, NAND, l, srcStr, tokens);
        
      • endsWithXOR

        public static boolean endsWithXOR​(java.lang.String srcStr,
                                          int sPos,
                                          int ePos,
                                          java.lang.String... tokens)
        Checks if one String srcStr matches any ending from a list of possible endings. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if the srcStr ends with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWith(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return XOR("endsWithXOR", srcStr, tokens, cmp -> endsWith(srcStr, l, cmp));
        
      • endsWithNAND

        public static boolean endsWithNAND​(java.lang.String srcStr,
                                           int sPos,
                                           int ePos,
                                           java.lang.String... tokens)
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]'). The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWith(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return NAND("endsWithNAND", srcStr, tokens, cmp -> endsWith(srcStr, l, cmp));
        
      • startsWithXOR

        public static boolean startsWithXOR​(java.lang.String srcStr,
                                            int sPos,
                                            int ePos,
                                            java.lang.String... tokens)
        Checks if one String srcStr matches any start from a list of possible beginning-String's. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWith(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return XOR("startsWithXOR", srcStr, tokens, cmp -> startsWith(srcStr, l, cmp));
        
      • startsWithNAND

        public static boolean startsWithNAND​(java.lang.String srcStr,
                                             int sPos,
                                             int ePos,
                                             java.lang.String... tokens)
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]'). The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWith(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return NAND("startsWithNAND", srcStr, tokens, cmp -> startsWith(srcStr, l, cmp));
        
      • endsWithXOR_CI

        public static boolean endsWithXOR_CI​(java.lang.String srcStr,
                                             int sPos,
                                             int ePos,
                                             java.lang.String... tokens)
        Checks if one String srcStr matches any ending from a list of possible endings.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWithIgnoreCase(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return XOR("endsWithXOR_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, l, cmp));
        
      • endsWithNAND_CI

        public static boolean endsWithNAND_CI​(java.lang.String srcStr,
                                              int sPos,
                                              int ePos,
                                              java.lang.String... tokens)
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]').

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWithIgnoreCase(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return NAND("endsWithNAND_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, l, cmp));
        
      • startsWithXOR_CI

        public static boolean startsWithXOR_CI​(java.lang.String srcStr,
                                               int sPos,
                                               int ePos,
                                               java.lang.String... tokens)
        Checks if one String srcStr matches any start from a list of possible beginning-String's.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWithIgnoreCase(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return XOR("startsWithXOR_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, l, cmp));
        
      • startsWithNAND_CI

        public static boolean startsWithNAND_CI​(java.lang.String srcStr,
                                                int sPos,
                                                int ePos,
                                                java.lang.String... tokens)
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]')

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWithIgnoreCase(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return NAND("startsWithNAND_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, l, cmp));
        
      • startsWith

        public static boolean startsWith​(java.lang.String srcStr,
                                         int sPos,
                                         int ePos,
                                         java.lang.String token)
        This performs the exact same comparison as Java's String.startsWith(String) method. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if srcStr starts with token. FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return startsWith(srcStr, new LV(srcStr, sPos, ePos), token);
        
      • startsWithIgnoreCase

        public static boolean startsWithIgnoreCase​(java.lang.String srcStr,
                                                   int sPos,
                                                   int ePos,
                                                   java.lang.String token)
        This performs the exact same comparison as Java's String.startsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'startsWithIgnoreCase()'. This method does just that.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if srcStr starts with token (ignoring-case). FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWithIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return startsWithIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), token);
        
      • endsWith

        public static boolean endsWith​(java.lang.String srcStr,
                                       int sPos,
                                       int ePos,
                                       java.lang.String token)
        This performs the exact same comparison as Java's String.endsWith(String) method. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if srcStr ends with token. FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return endsWith(srcStr, new LV(srcStr, sPos, ePos), token);
        
      • endsWithIgnoreCase

        public static boolean endsWithIgnoreCase​(java.lang.String srcStr,
                                                 int sPos,
                                                 int ePos,
                                                 java.lang.String token)
        This performs the exact same comparison as Java's String.endsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'endsWithIgnoreCase()'. This method does just that.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:

        white-space (matching '\s')
        String-start (matching '^')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if srcStr ends with token (ignoring-case). FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWithIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return endsWithIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), token);
        
      • contains

        public static boolean contains​(java.lang.String srcStr,
                                       int sPos,
                                       int ePos,
                                       java.lang.String token)
        This performs the exact same comparison as Java's String.contains(String) method. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if token is a substring of srcStr. FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        contains(String, LV, String)
        Code:
        Exact Method Body:
        1
         return contains(srcStr, new LV(srcStr, sPos, ePos), token);
        
      • containsIgnoreCase

        public static boolean containsIgnoreCase​(java.lang.String srcStr,
                                                 int sPos,
                                                 int ePos,
                                                 java.lang.String token)
        This performs the exact same comparison as Java's String.contains(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'containsIgnoreCase()'. This method does just that.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        Returns:
        TRUE if token is a substring of srcStr (ignoring-case). FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        containsIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return containsIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), token);
        
      • startsWith

        protected static boolean startsWith​(java.lang.String srcStr,
                                            LV l,
                                            java.lang.String token)
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
        
         return      ((l.end - l.start) >= tokenLen) 
                 &&  srcStr.regionMatches(l.start, token, 0, tokenLen)
                 &&  (   ((l.start + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(l.start + tokenLen)));
        
      • startsWithIgnoreCase

        protected static boolean startsWithIgnoreCase​(java.lang.String srcStr,
                                                      LV l,
                                                      java.lang.String token)
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
        
         return      ((l.end - l.start) >= tokenLen) 
                 &&  srcStr.regionMatches(true, l.start, token, 0, tokenLen)
                 &&  (   ((l.start + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(l.start + tokenLen)));
        
      • endsWith

        protected static boolean endsWith​(java.lang.String srcStr,
                                          LV l,
                                          java.lang.String token)
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
        
         return      ((l.end - l.start) >= tokenLen)
                 &&  srcStr.regionMatches(l.end - tokenLen, token, 0, tokenLen)
                 &&  (   ((l.end - tokenLen) == 0)
                     ||  Character.isWhitespace(srcStr.charAt(l.end - tokenLen - 1)));
        
      • endsWithIgnoreCase

        protected static boolean endsWithIgnoreCase​(java.lang.String srcStr,
                                                    LV l,
                                                    java.lang.String token)
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
            
         return      ((l.end - l.start) >= tokenLen)
                 &&  srcStr.regionMatches(true, l.end - tokenLen, token, 0, tokenLen)
                 &&  (   ((l.end - tokenLen) == 0)
                     ||  Character.isWhitespace(srcStr.charAt(l.end - tokenLen - 1)));
        
      • contains

        protected static boolean contains​(java.lang.String srcStr,
                                          LV l,
                                          java.lang.String token)
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
         // String.regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
         // Tests if two string regions are equal.  A substring of this {@code String} object is
         // compared to a substring of the argument other.  The result is true if these substrings
         // represent character sequences that are the same, ignoring case if and only if ignoreCase
         // is true.
        
         int tokenLen    = token.length();
         int loopLen     = l.end - tokenLen;
        
         if ((l.end - l.start) < token.length()) return false;
        
         for (int i=l.start; i <= loopLen; i++)
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (   (i == 0)
                     ||  Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (   ((i + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(i + tokenLen)))
                 )
                 return true;
        
         return false;
        
      • containsIgnoreCase

        protected static boolean containsIgnoreCase​(java.lang.String srcStr,
                                                    LV l,
                                                    java.lang.String token)
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
         // String.regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
         // Tests if two string regions are equal.  A substring of this {@code String} object is
         // compared to a substring of the argument other.  The result is true if these substrings
         // represent character sequences that are the same, ignoring case if and only if ignoreCase
         // is true.
        
         int tokenLen    = token.length();
         int loopLen     = l.end - tokenLen;
        
         if ((l.end - l.start) < token.length()) return false;
        
         for (int i=l.start; i <= loopLen; i++)
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (   (i == 0)
                     ||  Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (   ((i + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(i + tokenLen)))
                 )
                 return true;
        
         return false;
        
      • CONTAINS

        protected static boolean CONTAINS​(boolean ignoresCase,
                                          byte booleanOperation,
                                          LV l,
                                          java.lang.String srcStr,
                                          java.lang.String[] tokens)
        Implementing a 'contains' is more efficient by performing only one loop iteration. Therefore, the methods that implement some variant of the String.contains method will use this general-purpose contains-testing method.
        Parameters:
        ignoresCase - This is used to signify whether to ignore case when performing the String-comparison operations.
        booleanOperation - This is designed to take one of four values. This method will throw an exception if it does not.
        l - Loop end-point parameter
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be checked whether it is contained by 'srcStr'.
        Returns:
        The appropriate response based on the inputs for boolean logic.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
         int     len         = srcStr.length();
         int     count       = (booleanOperation == XOR) ? 0 : tokens.length;
         int[]   tokLenArr   = new int[tokens.length];
        
         for (int i=0; i < tokens.length; i++) tokLenArr[i] = tokens[i].length();
        
         for (int i=l.start; i < l.end; i++)
             for (int j=0; j < tokens.length; j++)
                 if (tokLenArr[j] != -1)
                     if (srcStr.regionMatches(ignoresCase, i, tokens[j], 0, tokLenArr[j]))
                         if (    (   (i==0)
                                 ||  Character.isWhitespace(srcStr.charAt(i-1)))
                             &&  (   ((i + tokLenArr[j]) == len)
                                 ||  Character.isWhitespace(srcStr.charAt(i + tokLenArr[j])))
                         )
                             switch (booleanOperation)
                             {
                                 case AND    :   tokLenArr[j] = -1;
                                                 if (--count == 0)   return true;
                                                 else                break;
                                 case XOR    :   tokLenArr[j] = -1;
                                                 if (++count > 1)    return false;
                                                 else                break;
                                 case OR     :   return true;
                                 case NAND   :   return false;
                                 default     :   throw new IllegalArgumentException
                                                 (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
                             }
        
         switch(booleanOperation)
         {
             case AND    : return false;
             case OR     : return false;
             case XOR    : return count == 1;
             case NAND   : return true;
             default     : throw new IllegalArgumentException
                             (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
         }
        
      • CONTAINS

        protected static boolean CONTAINS​(boolean ignoresCase,
                                          byte booleanOperation,
                                          java.lang.String srcStr,
                                          java.lang.String[] tokens)
        Implementing a 'contains' is more efficient by performing only one loop iteration. Therefore, the methods that implement some variant of the String.contains method will use this general-purpose contains-testing method.
        Parameters:
        ignoresCase - This is used to signify whether to ignore case when performing the String-comparison operations.
        booleanOperation - This is designed to take one of four values. This method will throw an exception if it does not.
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's, each of which shall be checked whether it is contained by 'srcStr'.
        Returns:
        The appropriate response based on the inputs for boolean logic.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
         int     len         = srcStr.length();
         int     count       = (booleanOperation == XOR) ? 0 : tokens.length;
         int[]   tokLenArr   = new int[tokens.length];
        
         for (int i=0; i < tokens.length; i++) tokLenArr[i] = tokens[i].length();
        
         for (int i=0; i < len; i++)
             for (int j=0; j < tokens.length; j++)
                 if (tokLenArr[j] != -1)
                     if (srcStr.regionMatches(ignoresCase, i, tokens[j], 0, tokLenArr[j]))
                         if (    (   (i==0)
                                 ||  Character.isWhitespace(srcStr.charAt(i-1)))
                             &&  (   ((i + tokens[j].length()) == len)
                                 ||  Character.isWhitespace(srcStr.charAt(i + tokens[j].length())))
                         )
                             switch (booleanOperation)
                             {
                                 case AND    :   tokLenArr[j] = -1;
                                                 if (--count == 0)   return true;
                                                 else                break;
                                 case XOR    :   tokLenArr[j] = -1;
                                                 if (++count > 1)    return false;
                                                 else                break;
                                 case OR     :   return true;
                                 case NAND   :   return false;
                                 default     :   throw new IllegalArgumentException
                                                 (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
                             }
        
         switch(booleanOperation)
         {
             case AND    : return false;
             case OR     : return false;
             case XOR    : return count == 1;
             case NAND   : return true;
             default     : throw new IllegalArgumentException
                             (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
         }
        
      • containsOR

        public static boolean containsOR​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, OR, srcStr, extraDelimiterTest, tokens);
        
      • containsAND

        public static boolean containsAND​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, AND, srcStr, extraDelimiterTest, tokens);
        
      • containsXOR

        public static boolean containsXOR​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, XOR, srcStr, extraDelimiterTest, tokens);
        
      • containsNAND

        public static boolean containsNAND​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is an "NOT-AND" (NOT-ANY) comparison. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(false, NAND, srcStr, extraDelimiterTest, tokens);
        
      • containsOR_CI

        public static boolean containsOR_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, OR, srcStr, extraDelimiterTest, tokens);
        
      • containsAND_CI

        public static boolean containsAND_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, AND, srcStr, extraDelimiterTest, tokens);
        
      • containsXOR_CI

        public static boolean containsXOR_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, XOR, srcStr, extraDelimiterTest, tokens);
        
      • containsNAND_CI

        public static boolean containsNAND_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is a "NOT-AND" (NOT-ANY) comparison.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        CONTAINS(boolean, byte, String, String[])
        Code:
        Exact Method Body:
        1
         return CONTAINS(true, NAND, srcStr, extraDelimiterTest, tokens);
        
      • endsWithXOR

        public static boolean endsWithXOR​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any ending from a list of possible endings. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of tokens, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        XOR(String, String, String[], Predicate), endsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return XOR(
             "endsWithXOR", srcStr, tokens,
             cmp -> endsWith(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp)
         );
        
      • endsWithNAND

        public static boolean endsWithNAND​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]'). The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        NAND(String, String, String[], Predicate), endsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return NAND(
             "endsWithNAND", srcStr, tokens,
             cmp -> endsWith(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp)
         );
        
      • startsWithXOR

        public static boolean startsWithXOR​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any start from a list of possible beginning-String's. The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        XOR(String, String, String[], Predicate), startsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return XOR(
             "startsWithXOR", srcStr, tokens,
             cmp -> startsWith(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp)
         );
        
      • startsWithNAND

        public static boolean startsWithNAND​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]'). The test performed is case-sensitive.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        NAND(String, String, String[], Predicate), startsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return NAND(
             "startsWithNAND", srcStr, tokens,
             cmp -> startsWith(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp)
         );
        
      • endsWithXOR_CI

        public static boolean endsWithXOR_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any ending from a list of possible endings.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        endsWithIgnoreCase(String, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return XOR(
             "endsWithXOR_CI", srcStr, tokens,
             cmp -> endsWithIgnoreCase(srcStr, extraDelimiterTest, cmp)
         );
        
      • endsWithNAND_CI

        public static boolean endsWithNAND_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]').

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        endsWithIgnoreCase(String, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return NAND(
             "endsWithNAND_CI", srcStr, tokens,
             cmp -> endsWithIgnoreCase(srcStr, extraDelimiterTest, cmp)
         );
        
      • startsWithXOR_CI

        public static boolean startsWithXOR_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any start from a list of possible beginning-String's.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        startsWithIgnoreCase(String, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return XOR(
             "startsWithXOR_CI", srcStr, tokens,
             cmp -> startsWithIgnoreCase(srcStr, extraDelimiterTest, cmp)
         );
        
      • startsWithNAND_CI

        public static boolean startsWithNAND_CI​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]')

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        startsWithIgnoreCase(String, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return NAND(
             "startsWithNAND_CI", srcStr, tokens,
             cmp -> startsWithIgnoreCase(srcStr, extraDelimiterTest, cmp)
         );
        
      • startsWith

        public static boolean startsWith​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.startsWith(String), but checks for white-space at the end of the token-match. The test performed is case-sensitive.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr starts with token, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return  srcStr.startsWith(token)
                 &&  (   (token.length() == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(token.length()))
                     ||  extraDelimiterTest.test(srcStr.charAt(token.length())));
        
      • endsWith

        public static boolean endsWith​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.endsWith(String) method, but checks for white-space at the end of the token-match. The test performed is case-sensitive.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr ends with token, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
        
         return  srcStr.endsWith(token)
                 &&  (   ((srcStr.length() - tokenLen) == 0)
                     ||  Character.isWhitespace(srcStr.charAt(srcStr.length() - tokenLen - 1))
                     ||  extraDelimiterTest.test(srcStr.charAt(srcStr.length() - tokenLen - 1)));
        
      • contains

        public static boolean contains​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.contains(String) method. It ensures that a 'token'-match, rather than a 'substring' match is identified. The test performed is case-sensitive.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if token is a substring of srcStr, and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
         int tokenLen    = token.length();
         int loopLen     = srcStr.length() - tokenLen;
        
         for (int i=0; i <= loopLen; i++)
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (   (i == 0)
                     ||  Character.isWhitespace(srcStr.charAt(i - 1))
                     ||  extraDelimiterTest.test(srcStr.charAt(i - 1)))
                 &&  (   ((i + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||  extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
                 )
                 return true;
        
         return false;
        
      • startsWithIgnoreCase

        public static boolean startsWithIgnoreCase​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.startsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not an 'startsWithIgnoreCase()'. This method does just that.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr starts with token (ignoring-case), and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
        4
         return  srcStr.regionMatches(true, 0, token, 0, token.length())
                 &&  (   (token.length() == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(token.length()))
                     ||  extraDelimiterTest.test(srcStr.charAt(token.length())));
        
      • endsWithIgnoreCase

        public static boolean endsWithIgnoreCase​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.endsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not an 'endsWithIgnoreCase()'. This method does just that.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr ends with token (ignoring-case), and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         int tokenLen = token.length();
        
         return  srcStr.regionMatches(true, srcStr.length() - tokenLen, token, 0, tokenLen)
                 &&  (   ((srcStr.length() - tokenLen) == 0)
                     ||  Character.isWhitespace(srcStr.charAt(srcStr.length() - tokenLen - 1))
                     ||  extraDelimiterTest.test(srcStr.charAt(srcStr.length() - tokenLen - 1)));
        
      • containsIgnoreCase

        public static boolean containsIgnoreCase​
                    (java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.contains(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'containsIgnoreCase()'. This method does just that.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if token is a substring of srcStr (ignoring-case), and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        See Also:
        containsIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
        2
         return containsIgnoreCase
             (srcStr, new LV(srcStr, 0, srcStr.length()), extraDelimiterTest, token);
        
      • containsOR

        public static boolean containsOR​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, OR, l, srcStr, extraDelimiterTest, tokens);
        
      • containsAND

        public static boolean containsAND​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, AND, l, srcStr, extraDelimiterTest, tokens);
        
      • containsXOR

        public static boolean containsXOR​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, XOR, l, srcStr, extraDelimiterTest, tokens);
        
      • containsNAND

        public static boolean containsNAND​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is an "NOT-AND" (NOT-ANY) comparison. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(false, NAND, l, srcStr, extraDelimiterTest, tokens);
        
      • containsOR_CI

        public static boolean containsOR_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if any of the String's inside String[] tokens are contained within srcStr. This is an "inclusive-OR" comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that at least one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if at least one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, OR, l, srcStr, extraDelimiterTest, tokens);
        
      • containsAND_CI

        public static boolean containsAND_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if every one of the String's inside String[] tokens is also contained within srcStr. This is an "AND" comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that each and every one of these String's will be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if every one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, AND, l, srcStr, extraDelimiterTest, tokens);
        
      • containsXOR_CI

        public static boolean containsXOR_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE if precisely-one of the String's inside String[] tokens is also contained within srcStr. This is an "exclusive-OR" (XOR) comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is expected that exactly one of these String's will also be a substring of 'srcStr'. If not, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if one-and-only-one of the 'tokens' elements is a substring of 'srcStr', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
         LV l = new LV(srcStr, sPos, ePos);
         return CONTAINS(true, XOR, l, srcStr, extraDelimiterTest, tokens);
        
      • containsNAND_CI

        public static boolean containsNAND_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        This will return TRUE only if none of the String's inside String[] tokens are found to be substrings within srcStr. This is a "NOT-AND" (NOT-ANY) comparison.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's. It is not expected to find even one of these String's present as a substring of 'srcStr'. If one is found, this method will return FALSE.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if every/all of the 'tokens' elements are found not to be contained as a substring of srcStr, and otherwise FALSE will be returned (if a match is found).

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        CONTAINS(boolean, byte, LV, String, String[])
        Code:
        Exact Method Body:
        1
        2
        3
         LV l = new LV(srcStr, sPos, ePos);
        
         return CONTAINS(true, NAND, l, srcStr, extraDelimiterTest, tokens);
        
      • endsWithXOR

        public static boolean endsWithXOR​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any ending from a list of possible endings. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWith(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return XOR(
             "endsWithXOR", srcStr, tokens,
             cmp -> endsWith(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • endsWithNAND

        public static boolean endsWithNAND​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]'). The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWith(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return NAND(
             "endsWithNAND", srcStr, tokens,
             cmp -> endsWith(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • startsWithXOR

        public static boolean startsWithXOR​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any start from a list of possible beginning-String's. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWith(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return XOR(
             "startsWithXOR", srcStr, tokens,
             cmp -> startsWith(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • startsWithNAND

        public static boolean startsWithNAND​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]'). The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with any of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWith(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return NAND(
             "startsWithNAND", srcStr, tokens,
             cmp -> startsWith(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • endsWithXOR_CI

        public static boolean endsWithXOR_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any ending from a list of possible endings.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr ends with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWithIgnoreCase(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return XOR(
             "endsWithXOR_CI", srcStr, tokens,
             cmp -> endsWithIgnoreCase(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • endsWithNAND_CI

        public static boolean endsWithNAND_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks and makes sure that one String srcStr does not match any of the endings from a list of possible endings ('tokens[]').

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the ending of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        FALSE if the srcStr ends with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWithIgnoreCase(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return NAND(
             "endsWithNAND_CI", srcStr, tokens,
             cmp -> endsWithIgnoreCase(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • startsWithXOR_CI

        public static boolean startsWithXOR_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks if one String srcStr matches any start from a list of possible beginning-String's.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if the srcStr starts with precisely one of the elements of 'tokens', and FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWithIgnoreCase(String, LV, String), XOR(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return XOR(
             "startsWithXOR_CI", srcStr, tokens,
             cmp -> startsWithIgnoreCase(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • startsWithNAND_CI

        public static boolean startsWithNAND_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String... tokens)
        
        Checks to make sure that one String srcStr does not begin with any of the listed "possible beginnings" from ('tokens[]')

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.

        'CI' NOTE: This method is identical to the one by the same name without the letters 'CI' appended. Here, 'CI' is an acronym for "Case Insensitive", and the difference implied is that all comparisons done by this method will ignore case.
        Parameters:
        srcStr - Any non-null instance of java.lang.String
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be compared to the start of 'srcStr'.

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        FALSE if the srcStr starts with any of the elements of 'tokens', and TRUE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWithIgnoreCase(String, LV, String), NAND(String, String, String[], Predicate)
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
         LV l = new LV(srcStr, sPos, ePos);
        
         return NAND(
             "startsWithNAND_CI", srcStr, tokens,
             cmp -> startsWithIgnoreCase(srcStr, l, extraDelimiterTest, cmp)
         );
        
      • startsWith

        public static boolean startsWith​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.startsWith(String) method. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr starts with token. FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return startsWith(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
        
      • startsWithIgnoreCase

        public static boolean startsWithIgnoreCase​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.startsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'startsWithIgnoreCase()'. This method does just that.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it starts with the token.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr starts with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that begins at srcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr starts token (ignoring-case). FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        startsWithIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return startsWithIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
        
      • endsWith

        public static boolean endsWith​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.endsWith(String) method. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr ends with token. FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWith(String, LV, String)
        Code:
        Exact Method Body:
        1
         return endsWith(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
        
      • endsWithIgnoreCase

        public static boolean endsWithIgnoreCase​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.endsWith(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'endsWithIgnoreCase()'. This method does just that.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it ends with the token.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if srcStr ends with token

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match within String parameter 'srcStr' that ends at srcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:

        white-space (matching '\s')
        String-start (matching '^')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if srcStr ends with token (ignoring-case). FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        endsWithIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return endsWithIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
        
      • contains

        public static boolean contains​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.contains(String) method. The test performed is case-sensitive.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if token is a substring of srcStr. FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        contains(String, LV, String)
        Code:
        Exact Method Body:
        1
         return contains(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
        
      • containsIgnoreCase

        public static boolean containsIgnoreCase​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This performs the exact same comparison as Java's String.contains(String) method. Java provides an 'equalsIgnoreCase()' method, but not a 'containsIgnoreCase()'. This method does just that.

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This String is checked to see if it contains the token
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results. If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        token - This String is checked against the srcStr - specifically, if token is contained by srcStr

        When this method makes token comparisons using the input String-token parameter(s), if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        any character which passes the parameter-provided Predicate<Character> delimiter test
        Returns:
        TRUE if token is a substring of srcStr (ignoring-case). FALSE otherwise.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        See Also:
        containsIgnoreCase(String, LV, String)
        Code:
        Exact Method Body:
        1
         return containsIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
        
      • startsWith

        protected static boolean startsWith​
                    (java.lang.String srcStr,
                     LV l,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
        7
         int tokenLen = token.length();
        
         return      ((l.end - l.start) >= tokenLen) 
                 &&  srcStr.regionMatches(l.start, token, 0, tokenLen)
                 &&  (   ((l.start + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(l.start + tokenLen))
                     ||  extraDelimiterTest.test(srcStr.charAt(l.start + tokenLen)));
        
      • startsWithIgnoreCase

        protected static boolean startsWithIgnoreCase​
                    (java.lang.String srcStr,
                     LV l,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
        7
         int tokenLen = token.length();
        
         return      ((l.end - l.start) >= tokenLen) 
                 &&  srcStr.regionMatches(true, l.start, token, 0, tokenLen)
                 &&  (   ((l.start + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(l.start + tokenLen))
                     ||  extraDelimiterTest.test(srcStr.charAt(l.start + tokenLen)));
        
      • endsWith

        protected static boolean endsWith​
                    (java.lang.String srcStr,
                     LV l,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
        7
         int tokenLen = token.length();
        
         return      ((l.end - l.start) >= tokenLen)
                 &&  srcStr.regionMatches(l.end - tokenLen, token, 0, tokenLen)
                 &&  (   ((l.end - tokenLen) == 0)
                     ||  Character.isWhitespace(srcStr.charAt(l.end - tokenLen - 1))
                     ||  extraDelimiterTest.test(srcStr.charAt(l.end - tokenLen - 1)));
        
      • endsWithIgnoreCase

        protected static boolean endsWithIgnoreCase​
                    (java.lang.String srcStr,
                     LV l,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
        1
        2
        3
        4
        5
        6
        7
         int tokenLen = token.length();
            
         return      ((l.end - l.start) >= tokenLen)
                 &&  srcStr.regionMatches(true, l.end - tokenLen, token, 0, tokenLen)
                 &&  (   ((l.end - tokenLen) == 0)
                     ||  Character.isWhitespace(srcStr.charAt(l.end - tokenLen - 1))
                     ||  extraDelimiterTest.test(srcStr.charAt(l.end - tokenLen - 1)));
        
      • contains

        protected static boolean contains​
                    (java.lang.String srcStr,
                     LV l,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
         // String.regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
         // Tests if two string regions are equal.  A substring of this {@code String} object is
         // compared to a substring of the argument other.  The result is true if these substrings
         // represent character sequences that are the same, ignoring case if and only if ignoreCase
         // is true.
        
         int tokenLen    = token.length();
         int loopLen     = l.end - tokenLen;
        
         if ((l.end - l.start) < token.length()) return false;
        
         for (int i=l.start; i <= loopLen; i++)
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (   (i == 0)
                     ||  Character.isWhitespace(srcStr.charAt(i-1))
                     ||  extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (   ((i + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||  extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
                 )
                 return true;
        
         return false;
        
      • containsIgnoreCase

        protected static boolean containsIgnoreCase​
                    (java.lang.String srcStr,
                     LV l,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String token)
        
        This method remains 'protected' because it utilizes a specialized Loop-Control Variable Class Version of 'LV'. It is used internally by the search methods above.
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
         // String.regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
         // Tests if two string regions are equal.  A substring of this {@code String} object is
         // compared to a substring of the argument other.  The result is true if these substrings
         // represent character sequences that are the same, ignoring case if and only if ignoreCase
         // is true.
        
         int tokenLen    = token.length();
         int loopLen     = l.end - tokenLen;
        
         if ((l.end - l.start) < token.length()) return false;
        
         for (int i=l.start; i <= loopLen; i++)
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (   (i == 0)
                     ||  Character.isWhitespace(srcStr.charAt(i-1))
                     ||  extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (   ((i + tokenLen) == srcStr.length())
                     ||  Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||  extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
                 )
                 return true;
        
         return false;
        
      • CONTAINS

        protected static boolean CONTAINS​
                    (boolean ignoresCase,
                     byte booleanOperation,
                     LV l,
                     java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String[] tokens)
        
        Implementing a 'contains' is more efficient by performing only one loop iteration. Therefore, the methods that implement some variant of the String.contains method will use this general-purpose contains-testing method.
        Parameters:
        ignoresCase - This is used to signify whether to ignore case when performing the String-comparison operations.
        booleanOperation - This is designed to take one of four values. This method will throw an exception if it does not.
        l - Loop end-point parameter
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be checked whether it is contained by 'srcStr'.
        Returns:
        The appropriate response based on the inputs for boolean logic.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
         int     len         = srcStr.length();
         int     count       = (booleanOperation == XOR) ? 0 : tokens.length;
         int[]   tokLenArr   = new int[tokens.length];
                
         for (int i=0; i < tokLenArr.length; i++) tokLenArr[i] = tokens[i].length();
        
         for (int i=l.start; i < l.end; i++)
             for (int j=0; j < tokens.length; j++)
                 if (tokLenArr[j] != -1)
                     if (srcStr.regionMatches(ignoresCase, i, tokens[j], 0, tokLenArr[j]))
                         if (    (   (i==0)
                                 ||  Character.isWhitespace(srcStr.charAt(i-1))
                                 ||  extraDelimiterTest.test(srcStr.charAt(i-1)))
                             &&  (   ((i + tokLenArr[j]) == len)
                                 ||  Character.isWhitespace(srcStr.charAt(i + tokLenArr[j]))
                                 ||  extraDelimiterTest.test(srcStr.charAt(i + tokLenArr[j])))
                         )
                             switch (booleanOperation)
                             {
                                 case AND    :   tokLenArr[j] = -1;
                                                 if (--count == 0)   return true;
                                                 else                break;
                                 case XOR    :   tokLenArr[j] = -1;
                                                 if (++count > 1)    return false;
                                                 else                break;
                                 case OR     :   return true;
                                 case NAND   :   return false;
                                 default     :   throw new IllegalArgumentException
                                                 (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
                             }
        
         switch(booleanOperation)
         {
             case AND    : return false;
             case OR     : return false;
             case XOR    : return count == 1;
             case NAND   : return true;
             default     : throw new IllegalArgumentException
                             (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
         }
        
      • CONTAINS

        protected static boolean CONTAINS​
                    (boolean ignoresCase,
                     byte booleanOperation,
                     java.lang.String srcStr,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest,
                     java.lang.String[] tokens)
        
        Implementing a 'contains' is more efficient by performing only one loop iteration. Therefore, the methods that implement some variant of the String.contains method will use this general-purpose contains-testing method.
        Parameters:
        ignoresCase - This is used to signify whether to ignore case when performing the String-comparison operations.
        booleanOperation - This is designed to take one of four values. This method will throw an exception if it does not.
        srcStr - Any non-null instance of java.lang.String
        extraDelimiterTest - Can be used if characters other than white-space should be considered as token-delimiters. Useful CharPredicate's to this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.

        Useful Predicate's to provide (might) include (but are not limited to) the following:
        Character::isSpaceChar (includes UNICODE White-Space)
        Character::isDigit
        c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
        Any character test of your choosing
        tokens - This is one (or many) java String's, each of which shall be checked whether it is contained by 'srcStr'.
        Returns:
        The appropriate response based on the inputs for boolean logic.

        When computing the boolean result of this method, all matches are considered based on 'Token' Matching, rather than 'Sub-String' Matching. This is explained in the description, above, for parameter token(s).
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
         int     count       = (booleanOperation == XOR) ? 0 : tokens.length;
         int     len         = srcStr.length();
         int[]   tokLenArr   = new int[tokens.length];
                
         for (int i=0; i < tokLenArr.length; i++) tokLenArr[i] = tokens[i].length();
        
         for (int i=0; i < len; i++)
             for (int j=0; j < tokens.length; j++)
                 if (tokLenArr[j] != -1)
                     if (srcStr.regionMatches(ignoresCase, i, tokens[j], 0, tokLenArr[j]))
                         if (    (   (i==0)
                                 ||  Character.isWhitespace(srcStr.charAt(i-1))
                                 ||  extraDelimiterTest.test(srcStr.charAt(i-1)))
                             &&  (   ((i+tokLenArr[j]) == len)
                                 ||  Character.isWhitespace(srcStr.charAt(i+tokLenArr[j]))
                                 ||  extraDelimiterTest.test(srcStr.charAt(i+tokLenArr[j])))
                         )
                             switch (booleanOperation)
                             {
                                 case AND    :   tokLenArr[j] = -1;
                                                 if (--count == 0)   return true;
                                                 else                break;
                                 case XOR    :   tokLenArr[j] = -1;
                                                 if (++count > 1)    return false;
                                                 else                break;
                                 case OR     :   return true;
                                 case NAND   :   return false;
                                 default     :   throw new IllegalArgumentException
                                                 (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
                             }
        
         switch(booleanOperation)
         {
             case AND    : return false;
             case OR     : return false;
             case XOR    : return count == 1;
             case NAND   : return true;
             default     : throw new IllegalArgumentException
                             (CONTAINS_EX.replace("BOOL", "" + booleanOperation));
         }