Package org.apache.kafka.streams.kstream
Interface Predicate<K,V>
- Type Parameters:
K
- key typeV
- value type
public interface Predicate<K,V>
The
Predicate
interface represents a predicate (boolean-valued function) of a KeyValue
pair.
This is a stateless record-by-record operation, i.e, test(Object, Object)
is invoked individually for each
record of a stream.-
Method Summary
-
Method Details
-
test
Test if the record with the given key and value satisfies the predicate.- Parameters:
key
- the key of the recordvalue
- the value of the record- Returns:
true
if theKeyValue
pair satisfies the predicate—false
otherwise
-