private boolean isNameAddress(String text) { boolean maybe = false; if (text != null) { for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (Character.getType(c) == Character.OTHER_LETTER) { maybe = true; break; } } } return maybe; }
private boolean isTelephoneZip(String text) { boolean maybe = true; if (text != null) { for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); int type = Character.getType(c); if (type == Character.DECIMAL_DIGIT_NUMBER || c == '-' || c == '(' || c == ')') { continue; } else { maybe = false; break; } } return maybe; } return false; }
private boolean isId(String text) { boolean maybe = true; if (text != null) { for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); int type = Character.getType(c); if (type == Character.UPPERCASE_LETTER || type == Character.LOWERCASE_LETTER || type == Character.DECIMAL_DIGIT_NUMBER) { continue; } else { maybe = false; break; } } return maybe; } return false; }