/** * Applies a Filter transformation on a {@link DataSet}. * * <p>The transformation calls a {@link org.apache.flink.api.common.functions.RichFilterFunction} for each element of the DataSet * and retains only those element for which the function returns true. Elements for * which the function returns false are filtered. * * @param filter The FilterFunction that is called for each element of the DataSet. * @return A FilterOperator that represents the filtered DataSet. * * @see org.apache.flink.api.common.functions.RichFilterFunction * @see FilterOperator * @see DataSet */ public FilterOperator<T> filter(FilterFunction<T> filter) { if (filter == null) { throw new NullPointerException("Filter function must not be null."); } return new FilterOperator<>(this, clean(filter), Utils.getCallLocationName()); }
/** * Applies a Filter transformation on a {@link DataSet}. * * <p>The transformation calls a {@link org.apache.flink.api.common.functions.RichFilterFunction} for each element of the DataSet * and retains only those element for which the function returns true. Elements for * which the function returns false are filtered. * * @param filter The FilterFunction that is called for each element of the DataSet. * @return A FilterOperator that represents the filtered DataSet. * * @see org.apache.flink.api.common.functions.RichFilterFunction * @see FilterOperator * @see DataSet */ public FilterOperator<T> filter(FilterFunction<T> filter) { if (filter == null) { throw new NullPointerException("Filter function must not be null."); } return new FilterOperator<>(this, clean(filter), Utils.getCallLocationName()); }
/** * Applies a Filter transformation on a {@link DataSet}. * * <p>The transformation calls a {@link org.apache.flink.api.common.functions.RichFilterFunction} for each element of the DataSet * and retains only those element for which the function returns true. Elements for * which the function returns false are filtered. * * @param filter The FilterFunction that is called for each element of the DataSet. * @return A FilterOperator that represents the filtered DataSet. * * @see org.apache.flink.api.common.functions.RichFilterFunction * @see FilterOperator * @see DataSet */ public FilterOperator<T> filter(FilterFunction<T> filter) { if (filter == null) { throw new NullPointerException("Filter function must not be null."); } return new FilterOperator<>(this, clean(filter), Utils.getCallLocationName()); }