Interface Predicate<K,V>

Type Parameters:
K - key type
V - 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.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(K key, V value)
    Test if the record with the given key and value satisfies the predicate.
  • Method Details

    • test

      boolean test(K key, V value)
      Test if the record with the given key and value satisfies the predicate.
      Parameters:
      key - the key of the record
      value - the value of the record
      Returns:
      true if the KeyValue pair satisfies the predicate—false otherwise