Class SubtypeCondition<T>
- java.lang.Object
-
- org.apache.flink.cep.pattern.conditions.IterativeCondition<T>
-
- org.apache.flink.cep.pattern.conditions.SimpleCondition<T>
-
- org.apache.flink.cep.pattern.conditions.SubtypeCondition<T>
-
- Type Parameters:
T
- Type of the elements to be filtered
- All Implemented Interfaces:
Serializable
,FilterFunction<T>
,Function
@Internal public class SubtypeCondition<T> extends SimpleCondition<T>
Acondition
which filters elements of the given type. An element is filtered out iff it is not assignable to the given subtype ofT
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.cep.pattern.conditions.IterativeCondition
IterativeCondition.Context<T>
-
-
Constructor Summary
Constructors Constructor Description SubtypeCondition(Class<? extends T> subtype)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
filter(T value)
The filter function that evaluates the predicate.-
Methods inherited from class org.apache.flink.cep.pattern.conditions.SimpleCondition
filter, of
-
-
-
-
Method Detail
-
filter
public boolean filter(T value) throws Exception
Description copied from interface:FilterFunction
The filter function that evaluates the predicate.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.
- Parameters:
value
- The value to be filtered.- Returns:
- True for values that should be retained, false for values to be filtered out.
- Throws:
Exception
- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
-