'Correct way to apply different fucntions based on condition in stream [closed]

What would be the correct way to implement this functional logic with streams?

  1. Stream through list of items

  2. Check if condition 1 passes, if so apply function 1 to the item.

    Check if condition 2 passes, if so apply function 2 to the item.

    If both conditions do not pass, do nothing.

  3. collect results

Do I create predicates with suppliers or how does this look? I'm not very familiar with functional Java.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source