Java tutorial
//package com.java2s; import java.util.Collection; import java.util.Iterator; public class Main { @SuppressWarnings("rawtypes") public static boolean allIn(Collection source, Collection target) { if (target == null || target.size() == 0) { return false; } for (Iterator it = source.iterator(); it.hasNext();) { Object object = it.next(); if (!target.contains(object)) { return false; } } return true; } }