I have a task, I need to make filters for streams with different types of objects.
There was an idea to do something like this:
private static