Class CollectionKeyFilter<K>

  • All Implemented Interfaces:
    Predicate<K>, KeyFilter<K>

    public class CollectionKeyFilter<K>
    extends 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 Detail

      • CollectionKeyFilter

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

        public CollectionKeyFilter​(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.