Java tutorial
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static boolean hasValue(Map<?, ?> map, String key, String val) { if (map == null) { return false; } Collection<?> col = (Collection<?>) map.get(key); if (col == null) { return false; } Iterator<?> itr = col.iterator(); while (itr.hasNext()) { String str = (String) itr.next(); if (str.equalsIgnoreCase(val)) { return true; } if (str.toLowerCase().startsWith(val)) { return true; } } return false; } }