Java List Contain containsIgnoreCase(final String candidate, final List options)

Here you can find the source of containsIgnoreCase(final String candidate, final List options)

Description

contains Ignore Case

License

Open Source License

Parameter

Parameter Description
candidate string used as search criteria against options
options list of strings

Return

true if string is equal to any one of the candidates disregarding case sensitivity

Declaration

public static final synchronized Boolean containsIgnoreCase(final String candidate,
        final List<String> options) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    /**// w  w  w.ja  va 2 s  . c o m
     *
     * @param candidate string used as search criteria against options
     * @param options list of strings
     * @return true if string is equal to any one of the candidates disregarding
     * case sensitivity
     */
    public static final synchronized Boolean containsIgnoreCase(final String candidate,
            final List<String> options) {
        for (String option : options) {
            if (option.equalsIgnoreCase(candidate)) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. containsExactly(List items, T... itemsToMatch)
  2. containsExternalFilter(List filterList, String dataSetExtId, String dataSourceExtId)
  3. containsFileName(String fileName, List filterList)
  4. containsHelpRequest(List args)
  5. containsId(List aList, Object anObj)
  6. containsIgnoreCase(final String string, final List list)
  7. containsIgnoreCase(List list, String strIn)
  8. containsIgnoreCase(List list, String findMe)
  9. containsIgnoreCase(List list, String s)