Java tutorial
//package com.java2s; import java.util.Collection; public class Main { static public boolean containsCaseInsensitive(Collection<String> items, final String queryItem) throws IllegalArgumentException { if (items == null || queryItem == null) { throw new IllegalArgumentException(); } for (String item : items) { if (queryItem.equalsIgnoreCase(item)) { return true; } } return false; } }