/** * Answers true if the pattern matches the given name using CamelCase rules, or false otherwise. * char[] CamelCase matching does NOT accept explicit wild-cards '*' and '?' and is inherently case sensitive. *

* CamelCase denotes the convention of writing compound names without spaces, and capitalizing every term. * This function recognizes both upper and lower CamelCase, depending whether the leading character is capitalized * or not. The leading part of an upper CamelCase pattern is assumed to contain a sequence of capitals which are appearing * in the matching name; e.g. 'NPE' will match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern * uses a lowercase first character. In Java, type names follow the upper CamelCase convention, whereas method or field * names follow the lower CamelCase convention. *

* The pattern may contain lowercase characters, which will be match in a case sensitive way. These characters must * appear in sequence in the name. For instance, 'NPExcep' will match 'NullPointerException', but not 'NullPointerExCEPTION' * or 'NuPoEx' will match 'NullPointerException', but not 'NoPointerException'. *

* Digit characters are treated in a special way. They can be used in the pattern but are not always considered as leading * character. For instance, both 'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'. *

* Camel Case rules are applied permissively which means that the name may have more parts than the pattern or its * last part may be a prefix of the pattern's last part (see {@link #camelCaseMatch(char[], int, int, char[], int, int, boolean)} * for more explanation on Camel Case strict/permissive mode. *

* Examples: *
    *
  1.  *    pattern = { 'N', 'P', 'E' }
     *    name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    result => true
     * 
    *
  2. *
  3.  *    pattern = { 'N', 'P', 'E' }
     *    name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    result => true
     * 
    *
  4. *
  5.  *    pattern = { 'N', 'u', 'P', 'o', 'E', 'x' }
     *    name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    result => true
     * 
    *
  6. *
  7.  *    pattern = { 'N', 'u', 'P', 'o', 'E', 'x' }
     *    name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    result => false
     * 
    *
  8. *
  9.  *    pattern = { 'n', p', 'e' }
     *    name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    result => false
     * 
    *
  10. *
  11.  *    pattern = { 'I', 'P', 'L', '3' }
     *    patternStart = 0
     *    patternEnd = 4
     *    name = { 'I', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '3' }
     *    nameStart = 0
     *    nameEnd = 21
     *    result => true
     * 
    *
  12. *
* * @param pattern the given pattern * @param name the given name * @return true if the pattern matches the given name, false otherwise * @since 3.2 */ public static final boolean camelCaseMatch(char[] pattern, char[] name) /** * Answers true if the pattern matches the given name using CamelCase rules, or false otherwise. * char[] CamelCase matching does NOT accept explicit wild-cards '*' and '?' and is inherently case sensitive. *

* CamelCase denotes the convention of writing compound names without spaces, and capitalizing every term. * This function recognizes both upper and lower CamelCase, depending whether the leading character is capitalized * or not. The leading part of an upper CamelCase pattern is assumed to contain a sequence of capitals which are appearing * in the matching name; e.g. 'NPE' will match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern * uses a lowercase first character. In Java, type names follow the upper CamelCase convention, whereas method or field * names follow the lower CamelCase convention. *

* The pattern may contain lowercase characters, which will be match in a case sensitive way. These characters must * appear in sequence in the name. For instance, 'NPExcep' will match 'NullPointerException', but not 'NullPointerExCEPTION' * or 'NuPoEx' will match 'NullPointerException', but not 'NoPointerException'. *

* Digit characters are treated in a special way. They can be used in the pattern but are not always considered as leading * character. For instance, both 'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'. *

* CamelCase rules can be applied strictly or permissively. When the strict mode is specified, the given pattern and name * must have exactly the same number of parts, and the last parts must be identical if they contain lowercase characters. * For instance, 'HMap<' and 'HaMap' patterns will match 'HashMap' but neither 'HashMapEntry' nor 'HatMapper'. * Note that when the last part does not contain lowercase characters, then the name may end with lowercase characters. * So, 'HM' pattern will match both 'HashMap' and 'HatMapper' but it will not match 'HashMapEntry'. * Reversely, if the permissive mode is specified, the names do not need to have the same number of parts and the same last parts. * Then, both 'HM' and 'HMap' will match 'HashMap', 'HatMapper' and'HashMapEntry'. *

*
 * Examples:
 * 
    *
  1. pattern = { 'N', 'P', 'E' } * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => true
  2. *
  3. pattern = { 'N', 'P', 'E' } * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => true
  4. *
  5. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => true
  6. *
  7. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => false
  8. *
  9. pattern = { 'n', p', 'e' } * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => false
  10. *
  11. pattern = { 'I', 'P', 'L', '3' } * name = { 'I', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '3' } * result => true
  12. *
  13. pattern = { 'H', M' } * name = { 'H', 'a', 's', 'h', 'M', 'a', 'p', 'E', 'n', 't', 'r', 'y' } * result => (exactMode == false)
  14. *
  15. pattern = { 'H', M', 'a', 'p' } * name = { 'H', 'a', 't', 'M', 'a', 'p', 'p', 'e', 'r' } * result => (exactMode == false)
  16. *
*
* * @param pattern the given pattern * @param name the given name * @param exactMode flag telling whether the name must have same * number of parts and same last part (if it consists of multiple letters) * as the pattern or not. * * @return true if the pattern matches the given name, false otherwise * @since 3.4 */ public static final boolean camelCaseMatch(char[] pattern, char[] name, boolean exactMode) /** * Answers true if a sub-pattern matches the sub-part of the given name using CamelCase rules, or false otherwise. * char[] CamelCase matching does NOT accept explicit wild-cards '*' and '?' and is inherently case sensitive. * Can match only subset of name/pattern, considering end positions as non-inclusive. * The sub-pattern is defined by the patternStart and patternEnd positions. *

* CamelCase denotes the convention of writing compound names without spaces, and capitalizing every term. * This function recognizes both upper and lower CamelCase, depending whether the leading character is capitalized * or not. The leading part of an upper CamelCase pattern is assumed to contain a sequence of capitals which are appearing * in the matching name; e.g. 'NPE' will match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern * uses a lowercase first character. In Java, type names follow the upper CamelCase convention, whereas method or field * names follow the lower CamelCase convention. *

* The pattern may contain lowercase characters, which will be match in a case sensitive way. These characters must * appear in sequence in the name. For instance, 'NPExcep' will match 'NullPointerException', but not 'NullPointerExCEPTION' * or 'NuPoEx' will match 'NullPointerException', but not 'NoPointerException'. *

* Digit characters are treated in a special way. They can be used in the pattern but are not always considered as leading * character. For instance, both 'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'. *

* Camel Case rules are applied permissively which means that the name may have more parts than the pattern and its * last part may be a prefix of the pattern's last part (see {@link #camelCaseMatch(char[], int, int, char[], int, int, boolean)} * for more explanation on Camel Case strict/permissive mode. *

* Examples: *
    *
  1.  *    pattern = { 'N', 'P', 'E' }
     *    patternStart = 0
     *    patternEnd = 3
     *    name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    nameStart = 0
     *    nameEnd = 20
     *    result => true
     * 
    *
  2. *
  3.  *    pattern = { 'N', 'P', 'E' }
     *    patternStart = 0
     *    patternEnd = 3
     *    name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    nameStart = 0
     *    nameEnd = 21
     *    result => true
     * 
    *
  4. *
  5.  *    pattern = { 'N', 'u', 'P', 'o', 'E', 'x' }
     *    patternStart = 0
     *    patternEnd = 6
     *    name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    nameStart = 0
     *    nameEnd = 20
     *    result => true
     * 
    *
  6. *
  7.  *    pattern = { 'N', 'u', 'P', 'o', 'E', 'x' }
     *    patternStart = 0
     *    patternEnd = 6
     *    name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    nameStart = 0
     *    nameEnd = 21
     *    result => false
     * 
    *
  8. *
  9.  *    pattern = { 'n', p', 'e' }
     *    patternStart = 0
     *    patternEnd = 3
     *    name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' }
     *    nameStart = 0
     *    nameEnd = 20
     *    result => false
     * 
    *
  10. *
  11.  *    pattern = { 'I', 'P', 'L', '3' }
     *    patternStart = 0
     *    patternEnd = 4
     *    name = { 'I', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '3' }
     *    nameStart = 0
     *    nameEnd = 21
     *    result => true
     * 
    *
  12. *
* * @param pattern the given pattern * @param patternStart the start index of the pattern, inclusive * @param patternEnd the end index of the pattern, exclusive * @param name the given name * @param nameStart the start index of the name, inclusive * @param nameEnd the end index of the name, exclusive * @return true if a sub-pattern matches the sub-part of the given name, false otherwise * @since 3.2 * @deprecated Use {@link #camelCaseMatch(char[], int, int, char[], int, int, boolean)} instead */ public static final boolean camelCaseMatch(char[] pattern, int patternStart, int patternEnd, char[] name, int nameStart, int nameEnd) /** * Answers true if a sub-pattern matches the sub-part of the given name using CamelCase rules, or false otherwise. * char[] CamelCase matching does NOT accept explicit wild-cards '*' and '?' and is inherently case sensitive. * Can match only subset of name/pattern, considering end positions as non-inclusive. * The sub-pattern is defined by the patternStart and patternEnd positions. *

* CamelCase denotes the convention of writing compound names without spaces, and capitalizing every term. * This function recognizes both upper and lower CamelCase, depending whether the leading character is capitalized * or not. The leading part of an upper CamelCase pattern is assumed to contain a sequence of capitals which are appearing * in the matching name; e.g. 'NPE' will match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern * uses a lowercase first character. In Java, type names follow the upper CamelCase convention, whereas method or field * names follow the lower CamelCase convention. *

* The pattern may contain lowercase characters, which will be match in a case sensitive way. These characters must * appear in sequence in the name. For instance, 'NPExcep' will match 'NullPointerException', but not 'NullPointerExCEPTION' * or 'NuPoEx' will match 'NullPointerException', but not 'NoPointerException'. *

* Digit characters are treated in a special way. They can be used in the pattern but are not always considered as leading * character. For instance, both 'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'. *

* CamelCase rules can be applied strictly or permissively. When the strict mode is specified, the given pattern and name * must have exactly the same number of parts, and the last parts must be identical if they contain lowercase characters. * For instance, 'HMap<' and 'HaMap' patterns will match 'HashMap' but neither 'HashMapEntry' nor 'HatMapper'. * Note that when the last part does not contain lowercase characters, then the name may end with lowercase characters. * So, 'HM' pattern will match both 'HashMap' and 'HatMapper' but it will not match 'HashMapEntry'. * Reversely, if the permissive mode is specified, names do not need to have the same number of parts and the same last parts. * Then, both 'HM' and 'HMap' will match 'HashMap', 'HatMapper' and'HashMapEntry'. *

*
 * Examples:
 * 
    *
  1. pattern = { 'N', 'P', 'E' } * patternStart = 0 * patternEnd = 3 * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 20 * result => true
  2. *
  3. pattern = { 'N', 'P', 'E' } * patternStart = 0 * patternEnd = 3 * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 21 * result => true
  4. *
  5. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * patternStart = 0 * patternEnd = 6 * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 20 * result => true
  6. *
  7. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * patternStart = 0 * patternEnd = 6 * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 21 * result => false
  8. *
  9. pattern = { 'n', p', 'e' } * patternStart = 0 * patternEnd = 3 * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 20 * result => false
  10. *
  11. pattern = { 'I', 'P', 'L', '3' } * patternStart = 0 * patternEnd = 4 * name = { 'I', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '3' } * nameStart = 0 * nameEnd = 21 * result => true
  12. *
  13. pattern = { 'H', M' } * patternStart = 0 * patternEnd = 2 * name = { 'H', 'a', 's', 'h', 'M', 'a', 'p', 'E', 'n', 't', 'r', 'y' } * nameStart = 0 * nameEnd = 12 * result => (exactMode == false)
  14. *
  15. pattern = { 'H', M', 'a', 'p' } * patternStart = 0 * patternEnd = 4 * name = { 'H', 'a', 't', 'M', 'a', 'p', 'p', 'e', 'r' } * nameStart = 0 * nameEnd = 9 * result => (exactMode == false)
  16. *
*
* * @param pattern the given pattern * @param patternStart the start index of the pattern, inclusive * @param patternEnd the end index of the pattern, exclusive * @param name the given name * @param nameStart the start index of the name, inclusive * @param nameEnd the end index of the name, exclusive * @param exactMode flag telling whether the name must have same * number of parts and same last part (if it consists of multiple letters) * as the pattern or not. * * @return true if a sub-pattern matches the sub-part of the given name, false otherwise * @since 3.4 */ public static final boolean camelCaseMatch(char[] pattern, int patternStart, int patternEnd, char[] name, int nameStart, int nameEnd, boolean exactMode)