public static boolean asBoolean(CharSequence string){
  return string.length() > 0;
}

public static boolean asBoolean ( CharSequence string ) { return string . length ( ) > 0 ; }
coerce a string ( an instance of charsequence ) to a boolean value . a string is coerced to false if it is of length 0 , and to true otherwise .
