| import com.google.common.base.Predicate; |
| import org.jetbrains.annotations.NotNull; |
| import org.jetbrains.annotations.Nullable; |
| * Filters out nullable elements allowing children to filter not-null elements |
| * @author Ilya.Kazakevich |
| public class NotNullPredicate<T> implements Predicate<T> { |
| public static final Predicate<Object> INSTANCE = new NotNullPredicate<Object>(); |
| public final boolean apply(@Nullable final T input) { |
| return applyNotNull(input); |
| protected boolean applyNotNull(@NotNull final T input) { |