You can't guarantee that you're always going to get String
objects back, or that the object you're working with in the List
implements a way to ignore case.
If you do want to compare String
s in a collection to something independent of case, you'd want to iterate over the collection and compare them without case.
String word = "Some word";
List<String> aList = new ArrayList<>(); // presume that the list is populated
for(String item : aList) {
if(word.equalsIgnoreCase(item)) {
// operation upon successful match
}
}