I\'ve got Google Guava inside Stream:
this.map.entrySet().stream() .filter(entity -> !Strings.isNullOrEmpty(entity.getValue())) .map(obj -> String.form
You can create your own Strings class with your own predicate:
Strings
public class Strings { public static boolean isNotNullOrEmpty (String str) { return str != null && !str.isEmpty(); } }
Then in your code:
.filter(Strings::isNotNullOrEmpty)
But as @fge mentionned, you can't use that on a Map.Entry,?>...
Map.Entry,?>