Interface Predicate<K,V>

Type Parameters:
K - the type of keys the predicate operates on.
V - the type of values the predicate operates on.
All Superinterfaces:
Serializable
All Known Subinterfaces:
PagingPredicate<K,V>, PartitionPredicate<K,V>, PredicateBuilder
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Predicate<K,V> extends Serializable
Represents a map entry predicate. Implementations of this interface are basic building blocks for performing queries on map entries.

Implementations must be thread-safe, since the apply(java.util.Map.Entry<K, V>) method may be called by multiple threads concurrently.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    apply(Map.Entry<K,V> mapEntry)
    Applies this predicate to the given map entry.
  • Method Details

    • apply

      boolean apply(Map.Entry<K,V> mapEntry)
      Applies this predicate to the given map entry.

      Implementations must be thread-safe, since this method may be called by multiple threads concurrently.

      Parameters:
      mapEntry - the map entry to apply this predicate to.
      Returns:
      true if the given map entry matches this predicate, false otherwise.