I have to filter a Collection of Objects by a Map, which holds key value pairs of the Objects field names and field values. I am trying to apply all filters by stream().filt
To apply a variable number of filter steps to a stream (that only become known at runtime), you could use a loop to add filter steps.
Stream stream = list.stream(); for (Predicate predicate: allPredicates) { stream = stream.filter(predicate); } list = stream.collect(Collectors.toList());