public static List < String > filterEmptyValues ( List < String > values ) { List < String > result = new ArrayList <> ( ) ; for ( String s : values ) { if ( ! Utils . isEmptyOrWhitespaces ( s ) ) result . add ( s ) ; } return result ; }
Creates a new list and only keeps values that are not null or made up of white characters .