Here you can find the source of containsIgnoreCase(final String candidate, final List
Parameter | Description |
---|---|
candidate | string used as search criteria against options |
options | list of strings |
public static final synchronized Boolean containsIgnoreCase(final String candidate, final List<String> options)
//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; } }