In Java, I have an ArrayList of Strings like:
[,Hi, ,How,are,you]
I want to remove the null and empty elements, how to change it so it is l
Going to drop this lil nugget in here:
Stream.of("", "Hi", null, "How", "are", "you") .filter(t -> !Strings.isNullOrEmpty(t)) .collect(ImmutableList.toImmutableList());
I wish with all of my heart that Java had a filterNot.
filterNot