package jp.agentec.adf.util; import java.util.Collection; public class CollectionUtil { @SuppressWarnings("rawtypes") public static boolean contains(Collection c, Object target) { if (c == null || target == null) { return false; } for (Object object : c) { if (object.equals(target)) { return true; } } return false; } @SuppressWarnings("rawtypes") public static boolean isEmpty(Collection c) { return c == null || c.isEmpty(); } @SuppressWarnings("rawtypes") public static boolean isNotEmpty(Collection c) { return !isEmpty(c); } }