public static boolean isString ( Object obj ) { if ( ( obj instanceof String ) || ( obj instanceof Character ) || ( obj != null && ( obj . getClass ( ) == Character . TYPE || String . class . isAssignableFrom ( obj . getClass ( ) ) ) ) ) { return true ; } return false ; }
Tests if obj is a String or a char