Guava: how to combine filter and transform?-open source projects google/guava

I have a collection of Strings, and I would like to convert it to a collection of strings were all empty or null Strings are removed and all others are trimmed.

I can do it in two steps:

final List tokens =
    Lists.newArrayList(" some ", null, "stuff\t", "", " \nhere");
final Collection filtered =
        Collections2.transform(tokens, new Function(){

            // This is a substitute for StringUtils.stripToEmpty()
            // why doesn't Guava have stuff like that?
            public String apply(final String input){
                return input == null ? "" : input.trim();
        }), new Predicate(){

            public boolean apply(final String input){
                return !Strings.isNullOrEmpty(input);

// Output, as desired: [some, stuff, here]

But is there a Guava way of combining the two actions into one step?