/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
/** * Returns true iff str.toLowerCase().endsWith(end.toLowerCase()) * implementation is not creating extra strings. */ public final static boolean endsWithIgnoreCase(String str, String end) { int strLength = str == null ? 0 : str.length(); int endLength = end == null ? 0 : end.length(); // return false if the string is smaller than the end. if(endLength > strLength) return false; // return false if any character of the end are // not the same in lower case. for(int i = 1 ; i <= endLength; i++){ if(ScannerHelper.toLowerCase(end.charAt(endLength - i)) != ScannerHelper.toLowerCase(str.charAt(strLength - i))) return false; } return true; }
private char[] substituteMethodTypeParameterName(char firstName, char startChar, char endChar, char[][] excludedNames, char[][] otherParameterNames) { char name = firstName; next : while (true) { for (int i = 0 ; i < excludedNames.length ; i++){ if(excludedNames[i].length == 1 && ScannerHelper.toLowerCase(excludedNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } for (int i = 0; i < otherParameterNames.length; i++) { if(otherParameterNames[i].length == 1 && ScannerHelper.toLowerCase(otherParameterNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } break next; } return new char[]{name}; }
private char[] substituteMethodTypeParameterName(char firstName, char startChar, char endChar, char[][] excludedNames, char[][] otherParameterNames) { char name = firstName; next : while (true) { for (int i = 0 ; i < excludedNames.length ; i++){ if(excludedNames[i].length == 1 && ScannerHelper.toLowerCase(excludedNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } for (int i = 0; i < otherParameterNames.length; i++) { if(otherParameterNames[i].length == 1 && ScannerHelper.toLowerCase(otherParameterNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } break next; } return new char[]{name}; }
private char[] substituteMethodTypeParameterName(char firstName, char startChar, char endChar, char[][] excludedNames, char[][] otherParameterNames) { char name = firstName; next : while (true) { for (int i = 0 ; i < excludedNames.length ; i++){ if(excludedNames[i].length == 1 && ScannerHelper.toLowerCase(excludedNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } for (int i = 0; i < otherParameterNames.length; i++) { if(otherParameterNames[i].length == 1 && ScannerHelper.toLowerCase(otherParameterNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } break next; } return new char[]{name}; }
private char[] substituteMethodTypeParameterName(char firstName, char startChar, char endChar, char[][] excludedNames, char[][] otherParameterNames) { char name = firstName; next : while (true) { for (int i = 0 ; i < excludedNames.length ; i++){ if(excludedNames[i].length == 1 && ScannerHelper.toLowerCase(excludedNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } for (int i = 0; i < otherParameterNames.length; i++) { if(otherParameterNames[i].length == 1 && ScannerHelper.toLowerCase(otherParameterNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } break next; } return new char[]{name}; }
private char[] substituteMethodTypeParameterName(char firstName, char startChar, char endChar, char[][] excludedNames, char[][] otherParameterNames) { char name = firstName; next : while (true) { for (int i = 0 ; i < excludedNames.length ; i++){ if(excludedNames[i].length == 1 && ScannerHelper.toLowerCase(excludedNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } for (int i = 0; i < otherParameterNames.length; i++) { if(otherParameterNames[i].length == 1 && ScannerHelper.toLowerCase(otherParameterNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } break next; } return new char[]{name}; }
private char[] substituteMethodTypeParameterName(char firstName, char startChar, char endChar, char[][] excludedNames, char[][] otherParameterNames) { char name = firstName; next : while (true) { for (int i = 0 ; i < excludedNames.length ; i++){ if(excludedNames[i].length == 1 && ScannerHelper.toLowerCase(excludedNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } for (int i = 0; i < otherParameterNames.length; i++) { if(otherParameterNames[i].length == 1 && ScannerHelper.toLowerCase(otherParameterNames[i][0]) == ScannerHelper.toLowerCase(name)) { name++; if(name > endChar) name = startChar; if(name == firstName) return substituteMethodTypeParameterName(new char[]{firstName}, excludedNames, otherParameterNames); continue next; } } break next; } return new char[]{name}; }
previousIsUnderscore = false; } else { baseName[++baseNamePtr] = ScannerHelper.toLowerCase(c);
previousIsUnderscore = false; } else { baseName[++baseNamePtr] = ScannerHelper.toLowerCase(c);
previousIsUnderscore = false; } else { baseName[++baseNamePtr] = ScannerHelper.toLowerCase(c);
previousIsUnderscore = false; } else { baseName[++baseNamePtr] = ScannerHelper.toLowerCase(c);
previousIsUnderscore = false; } else { baseName[++baseNamePtr] = ScannerHelper.toLowerCase(c);
previousIsUnderscore = false; } else { baseName[++baseNamePtr] = ScannerHelper.toLowerCase(c);
if (updateFirstCharacter) withoutSuffixName[0] = ScannerHelper.toLowerCase(withoutSuffixName[0]); return withoutSuffixName;