I have a List of String and I wanted to check if any of the String in the list matches the value of the ENUM. So I have done this. The boolean works fine. But I wanted to find the matching element from the list (first match).
boolean isMatch = Arrays.stream(MyEnum.values())
.map(MyEnum::getValue)
.anyMatch(myList::contains);
if(isMatch){
//get that matching string from the list .. i.e first matching string
}