can you help me to build a condition. This is the example:
ArrayList<Integer> list = new ArrayList();
list.add(1);
list.add(2);
list.add(3);
list.add(4);
I have 2 predicates.
ArrayList<Predicate<Integer>> predicates = new ArrayList<>();
predicates.add(x -> x == 4);
predicates.add(x -> x == 1);
I want to find first element that match first predicate. (In this example that would be 4)
How can this be done?