T
- The type of the filtered elements.@Public @FunctionalInterface public interface FilterFunction<T> extends Function, Serializable
The basic syntax for using a FilterFunction is as follows:
DataSet<X> input = ...;
DataSet<X> result = input.filter(new MyFilterFunction());
IMPORTANT: The system assumes that the function does not modify the elements on which the predicate is applied. Violating this assumption can lead to incorrect results.
Modifier and Type | Method and Description |
---|---|
boolean |
filter(T value)
The filter function that evaluates the predicate.
|
boolean filter(T value) throws Exception
IMPORTANT: The system assumes that the function does not modify the elements on which the predicate is applied. Violating this assumption can lead to incorrect results.
value
- The value to be filtered.Exception
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.