I have a String
as "ishant" and a Set<String>
as ["Ishant", "Gaurav", "sdnj"] . I need to write the Predicate for this. I have tried as below code, but it is not working
Predicate<Set<String>,String> checkIfCurrencyPresent = (currencyList,currency) -> currencyList.contains(currency);
How can I create a Predicate
which will take Set<String>
and String
as a parameter and can give the result?