import java.util.List; public class X { boolean test(List list) { return list.stream().anyMatch(s -> s.toLowerCase().equals("test")); } }