Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static boolean containsStringIgnoreCase(Collection<? extends String> strings, String string) { if (strings == null) { throw new NullPointerException("strings == null"); } if (string == null) { throw new NullPointerException("string == null"); } for (String s : strings) { if (string.equalsIgnoreCase(s)) { return true; } } return false; } }