I have a simple List which is ordered.
A = ["a","b","c","d","e"];
I need to generate a subset of the list based on the criteria. If an element E
exists in the array, then return all the elements in the List after the element E
, otherwise return null
.
Normally, I'd do this something like:
int index = A.indexOf("e");
List<String> subList = A.subList(index, A.size());
Can this be done with an equivalent lambda expression?