rename mapNotNull() to filterMap() for kotlin compatibility

This commit is contained in:
Gregory.Shrago
2017-09-02 18:49:39 +03:00
parent 127f42f00f
commit 69ceb30196
@@ -519,13 +519,14 @@ public abstract class JBIterable<E> implements Iterable<E> {
}
/**
* Synonym for map(..).filter(o -> o != null).
* Synonym for map(..).filter(notNull()).
*
* @see JBIterable#transform(Function)
* @see JBIterable#map(Function)
* @see JBIterable#filter(Condition)
*/
@NotNull
public final <T> JBIterable<T> mapNotNull(@NotNull Function<? super E, T> function) {
return transform(function).filter(Conditions.<T>notNull());
public final <T> JBIterable<T> filterMap(@NotNull Function<? super E, T> function) {
return map(function).filter(Conditions.<T>notNull());
}
/**