public static boolean containsCaseInsensitive(String s, List<String> l){
    for (String listItem : l){
      if (listItem.equalsIgnoreCase(s)){
        return true;
      }
    }
    return false;
  }
Returns <tt>true</tt> if this list contains the specified string element, ignoring case considerations.
@param s element whose presence in this list is to be tested
@param l list of strings, where presence of string element would be checked
@return <tt>true</tt> if this list contains the specified element
ambari-server/src/main/java/org/apache/ambari/server/utils/CustomStringUtils.java