public static void checkNotEmpty ( CharSequence str , String message ) { if ( str == null || str . length ( ) == 0 ) { throw new IllegalArgumentException ( message ) ; } }
Throws an exception with a message when CharSequence is null