static String firstNonEmpty ( String ... candidates ) { for ( String s : candidates ) { if ( ! isEmpty ( s ) ) { return s ; } } return null ; }
Returns the first non - empty non - null string in the given list or null otherwise .