I have 3 filters but they are not always filled with values!
for example:
a=1, b=2, c=null
and I have this for filtering:
myList.stream()
.filter(item->item.a == a)
.filter(item->item.b == b)
.filter(item->item.c == c)
.Collect(collection.asList);
But it does not work for me. I need the c parameter and its filter to be ignored if my input for c is null like this:
myList.stream()
.filter(item->item.a == a)
.filter(item->item.b == b)
.Collect(collection.asList);
And whenever each other filter is null, it should be removed from filter's chain like c in previous example.
item.cand of inputc?.filter(item -> item.c == null || item.c == c)?