public static boolean isAllWhitespace(CharSequence self){
  for (int i=0; i < self.length(); i++) {
    if (!Character.isWhitespace(self.charAt(i)))     return false;
  }
  return true;
}

public static boolean isAllWhitespace ( CharSequence self ) { for ( int i = 0 ; i < self . length ( ) ; i ++ ) { if ( ! Character . isWhitespace ( self . charAt ( i ) ) ) return false ; } return true ; }
true if a charsequence only contains whitespace characters .
