public static < K , V > List < V > removeAllIfByKey ( Map < K , V > map , Predicate < ? super K > filter ) { return map . keySet ( ) . stream ( ) . filter ( filter ) . collect ( toList ( ) ) . stream ( ) . map ( map :: remove ) . collect ( toList ( ) ) ; }
Remove all if by key list .