コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }