Class CollectionKeyFilter<K>

  • All Implemented Interfaces:
    java.util.function.Predicate<K>, KeyFilter<K>

    public class CollectionKeyFilter<K>
    extends java.lang.Object
    implements KeyFilter<K>
    Filter based on accepting/rejecting the keys that are present in a supplied collection.
    Since:
    6.0
    Author:
    Mircea Markus
    • Constructor Summary

      Constructors 
      Constructor Description
      CollectionKeyFilter​(java.util.Collection<? extends K> keys)  
      CollectionKeyFilter​(java.util.Collection<? extends K> keys, boolean accept)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(K key)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.infinispan.filter.KeyFilter

        test
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
    • Constructor Detail

      • CollectionKeyFilter

        public CollectionKeyFilter​(java.util.Collection<? extends K> keys)
      • CollectionKeyFilter

        public CollectionKeyFilter​(java.util.Collection<? extends K> keys,
                                   boolean accept)
    • Method Detail

      • accept

        public boolean accept​(K key)
        Specified by:
        accept in interface KeyFilter<K>
        Parameters:
        key - key to test
        Returns:
        true if the given key is accepted by this filter.