public static <K, V> boolean containsAllHelper(Map<K, V> map, Collection<?> collection) {
        Iterator<?> it = collection.iterator();
        while (it.hasNext()) {
            if (!map.containsKey(it.next())) {
                return false;
            }
        }
        return true;
    }
Helper for writing standard Java collection interfaces to a data
structure like {@link ArrayMap}.

@author RePlugin Team
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/utils/basic/MapCollections.java