Java tutorial
//package com.java2s; import java.util.*; public class Main { public static List<String> removeAllIgnoreCase(List<String> all, List<String> beside) { List<String> rst = new ArrayList<String>(); if (all == null || all.isEmpty()) { return rst; } if (beside == null || beside.isEmpty()) { return all; } for (String desc : all) { boolean eq = false; for (String str : beside) { if ((desc + "").equalsIgnoreCase(str)) { eq = true; break; } } if (!eq) { rst.add(desc); } } return rst; } public static boolean isEmpty(List<?> list) { return list == null || list.isEmpty(); } public static boolean isEmpty(Collection<?> collection) { return collection == null || collection.isEmpty(); } public static boolean isEmpty(Map<?, ?> map) { return map == null || map.isEmpty(); } public static boolean isEmpty(Set<?> set) { return set == null || set.isEmpty(); } public static <T> boolean isEmpty(T[] array) { return array == null || array.length <= 0; } }