public static <K, V> Map<K, V> filterAndTransform(Map<K, V> map,
      FilteringTransformer<Map.Entry<K, V>> filteringTransformer) {

    Assert.notNull(map, "Map is required");
    Assert.notNull(filteringTransformer, "FilteringTransformer is required");

    return map.entrySet().stream().filter(filteringTransformer::accept).map(filteringTransformer::transform)
      .collect(Collectors.toMap(Map.Entry::<K>getKey, Map.Entry::<V>getValue));
  }
public static < K , V > Map < K , V > filterAndTransform ( Map < K , V > map , FilteringTransformer < Map . Entry < K , V > > filteringTransformer ) { Assert . notNull ( map , "Map is required" ) ; Assert . notNull ( filteringTransformer , "FilteringTransformer is required" ) ; return map . entrySet ( ) . stream ( ) . filter ( filteringTransformer :: accept ) . map ( filteringTransformer :: transform ) . collect ( Collectors . toMap ( Map . Entry :: < K > getKey , Map . Entry :: < V > getValue ) ) ; }
Filters and transform the entries in the given {@link Map} using the provided {@link FilteringTransformer}.

@param <K> Class type of the key.
@param <V> Class type of the value.
@param map {@link Map} to filter and transform.
@param filteringTransformer {@link FilteringTransformer} used to filter and transform the given {@link Map}.
@return a filtered, transformed {@link Map} of entries from the given {@link Map}.
@throws IllegalArgumentException if the {@link Map} or {@link FilteringTransformer} are null.
@see org.cp.elements.lang.FilteringTransformer
@see java.util.Map
@see #filter(Map, Filter)
@see #transform(Map, Transformer)